diff --git a/spec/ameba/cli/cmd_spec.cr b/spec/ameba/cli/cmd_spec.cr index 2265a892..867b6d45 100644 --- a/spec/ameba/cli/cmd_spec.cr +++ b/spec/ameba/cli/cmd_spec.cr @@ -5,7 +5,7 @@ module Ameba::Cli describe "Cmd" do describe ".run" do it "runs ameba" do - r = Cli.run %w(-f silent -c spec/fixtures/config.yml spec/fixtures/passing_ameba.cr) + r = Cli.run %w(-f silent -c spec/fixtures/config.yml spec/fixtures/source.cr) r.should be_nil end end @@ -43,12 +43,12 @@ module Ameba::Cli end it "defaults rules? flag to false" do - c = Cli.parse_args %w(spec/fixtures/passing_ameba.cr) + c = Cli.parse_args %w(spec/fixtures/source.cr) c.rules?.should be_false end it "defaults skip_reading_config? flag to false" do - c = Cli.parse_args %w(spec/fixtures/passing_ameba.cr) + c = Cli.parse_args %w(spec/fixtures/source.cr) c.skip_reading_config?.should be_false end @@ -58,7 +58,7 @@ module Ameba::Cli end it "defaults all? flag to false" do - c = Cli.parse_args %w(spec/fixtures/passing_ameba.cr) + c = Cli.parse_args %w(spec/fixtures/source.cr) c.all?.should be_false end @@ -95,35 +95,35 @@ module Ameba::Cli describe "-e/--explain" do it "configures file/line/column" do - c = Cli.parse_args %w(--explain spec/fixtures/passing_ameba.cr:3:5) + c = Cli.parse_args %w(--explain spec/fixtures/source.cr:3:5) location_to_explain = c.location_to_explain.should_not be_nil - location_to_explain[:file].should eq "spec/fixtures/passing_ameba.cr" + location_to_explain[:file].should eq "spec/fixtures/source.cr" location_to_explain[:line].should eq 3 location_to_explain[:column].should eq 5 end it "raises an error if location is not valid" do expect_raises(Exception, "location should have PATH:line:column") do - Cli.parse_args %w(--explain spec/fixtures/passing_ameba.cr:3) + Cli.parse_args %w(--explain spec/fixtures/source.cr:3) end end it "raises an error if line number is not valid" do expect_raises(Exception, "location should have PATH:line:column") do - Cli.parse_args %w(--explain spec/fixtures/passing_ameba.cr:a:3) + Cli.parse_args %w(--explain spec/fixtures/source.cr:a:3) end end it "raises an error if column number is not valid" do expect_raises(Exception, "location should have PATH:line:column") do - Cli.parse_args %w(--explain spec/fixtures/passing_ameba.cr:3:&) + Cli.parse_args %w(--explain spec/fixtures/source.cr:3:&) end end it "raises an error if line/column are missing" do expect_raises(Exception, "location should have PATH:line:column") do - Cli.parse_args %w(--explain spec/fixtures/passing_ameba.cr) + Cli.parse_args %w(--explain spec/fixtures/source.cr) end end end diff --git a/spec/fixtures/passing_ameba.cr b/spec/fixtures/source.cr similarity index 100% rename from spec/fixtures/passing_ameba.cr rename to spec/fixtures/source.cr