spec/runner_spec.rb in thor-0.12.0 vs spec/runner_spec.rb in thor-0.12.2

- old
+ new

@@ -76,16 +76,16 @@ it "does not swallow NoMethodErrors that occur inside the called method" do ARGV.replace ["my_script:call_unexistent_method"] lambda { Thor::Runner.start }.must raise_error(NoMethodError) end - it "does not swallow Thor::Group ArgumentError" do + it "does not swallow Thor::Group InvocationError" do ARGV.replace ["whiny_generator"] lambda { Thor::Runner.start }.must raise_error(ArgumentError, /Are you sure it has arity equals to 0\?/) end - it "does not swallow Thor ArgumentError" do + it "does not swallow Thor InvocationError" do ARGV.replace ["my_script:animal"] capture(:stderr) { Thor::Runner.start }.must =~ /'animal' was called incorrectly\. Call as 'my_script:animal TYPE'/ end end @@ -108,11 +108,11 @@ describe "list" do it "gives a list of the available tasks" do ARGV.replace ["list"] content = capture(:stdout) { Thor::Runner.start } - content.must =~ /amazing:describe NAME \[\-\-forcefully\]\s+# say that someone is amazing/m + content.must =~ /amazing:describe NAME\s+# say that someone is amazing/m end it "gives a list of the available Thor::Group classes" do ARGV.replace ["list"] capture(:stdout) { Thor::Runner.start }.must =~ /my_counter N \[N\]/ @@ -139,11 +139,11 @@ capture(:stdout) { Thor::Runner.start }.must_not =~ /amazing:help/ end it "presents tasks in the default namespace with an empty namespace" do ARGV.replace ["list"] - capture(:stdout) { Thor::Runner.start }.must =~ /^:test\s+# prints 'test'/m + capture(:stdout) { Thor::Runner.start }.must =~ /^thor :test\s+# prints 'test'/m end it "runs tasks with an empty namespace from the default namespace" do ARGV.replace [":test"] capture(:stdout) { Thor::Runner.start }.must == "test\n" @@ -181,10 +181,10 @@ end it "displays the modules installed in a pretty way" do stdout = capture(:stdout) { Thor::Runner.start(["installed"]) } stdout.must =~ /random\s*amazing/ - stdout.must =~ /amazing:describe NAME \[\-\-forcefully\]\s+# say that someone is amazing/m + stdout.must =~ /amazing:describe NAME\s+# say that someone is amazing/m end end describe "install" do it "installs thor files" do