File: command_helpers.rb

package info (click to toggle)
ruby-fission 0.5.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 624 kB
  • sloc: ruby: 4,664; makefile: 10
file content (12 lines) | stat: -rw-r--r-- 429 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
module CommandHelpers
  def it_should_not_accept_arguments_of(args, command_name)
    it "should output an error and the help when #{args.count} arguments are passed in" do
      subject.should_receive(:help)

      command = subject.new args
      lambda { command.execute }.should raise_error SystemExit

      @string_io.string.should match /[Incorrect arguments for #{command_name} command|invalid option]/
    end
  end
end