checker 0.7.0 → 0.8.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +5 -6
  3. data/Gemfile +1 -1
  4. data/Gemfile.lock +89 -45
  5. data/Guardfile +16 -0
  6. data/Rakefile +2 -2
  7. data/bin/checker +2 -2
  8. data/checker.gemspec +13 -11
  9. data/lib/checker.rb +14 -16
  10. data/lib/checker/cli.rb +19 -22
  11. data/lib/checker/core_ext.rb +7 -9
  12. data/lib/checker/helper.rb +1 -1
  13. data/lib/checker/installator.rb +8 -8
  14. data/lib/checker/modules/base.rb +42 -44
  15. data/lib/checker/modules/coffeescript.rb +5 -3
  16. data/lib/checker/modules/conflict.rb +4 -4
  17. data/lib/checker/modules/console_log.rb +4 -3
  18. data/lib/checker/modules/haml.rb +4 -2
  19. data/lib/checker/modules/javascript.rb +5 -3
  20. data/lib/checker/modules/multifile.rb +16 -0
  21. data/lib/checker/modules/pry.rb +4 -4
  22. data/lib/checker/modules/rubocop.rb +12 -4
  23. data/lib/checker/modules/ruby.rb +6 -3
  24. data/lib/checker/modules/sass.rb +16 -14
  25. data/lib/checker/modules/slim.rb +4 -2
  26. data/lib/checker/modules/yaml.rb +5 -3
  27. data/lib/checker/options.rb +1 -1
  28. data/lib/checker/results/console_log.rb +1 -1
  29. data/lib/checker/rvm.rb +2 -2
  30. data/lib/checker/version.rb +1 -1
  31. data/spec/checker/cli_spec.rb +10 -8
  32. data/spec/checker/fixtures/conflict/without_conflict.rb +1 -2
  33. data/spec/checker/fixtures/pry/with_both.rb +1 -2
  34. data/spec/checker/fixtures/pry/with_pry.rb +1 -1
  35. data/spec/checker/fixtures/pry/with_pry_remote.rb +1 -1
  36. data/spec/checker/fixtures/pry/without_pry.rb +1 -2
  37. data/spec/checker/fixtures/ruby/good.rb +1 -1
  38. data/spec/checker/modules/base_spec.rb +15 -15
  39. data/spec/checker/modules/coffeescript_spec.rb +11 -11
  40. data/spec/checker/modules/conflict_spec.rb +8 -8
  41. data/spec/checker/modules/console_log_spec.rb +13 -13
  42. data/spec/checker/modules/haml_spec.rb +13 -13
  43. data/spec/checker/modules/javascript_spec.rb +22 -22
  44. data/spec/checker/modules/pry_spec.rb +10 -10
  45. data/spec/checker/modules/ruby_spec.rb +9 -10
  46. data/spec/checker/modules/sass_spec.rb +46 -46
  47. data/spec/checker/modules/slim_spec.rb +12 -12
  48. data/spec/checker/modules/yaml_spec.rb +12 -12
  49. data/spec/spec_helper.rb +6 -14
  50. metadata +39 -10
@@ -1,9 +1,11 @@
1
1
  module Checker
2
2
  module Modules
3
3
  class Slim < Base
4
- extensions 'slim'
4
+ extensions "slim"
5
+
5
6
  private
6
- def check_one(file, opts = {})
7
+
8
+ def check_one(file, _opts = {})
7
9
  Checker::Result.result(self, plain_command("slimrb --compile #{file} >> /dev/null"))
8
10
  end
9
11
 
@@ -1,11 +1,13 @@
1
- require 'yaml'
1
+ require "yaml"
2
2
 
3
3
  module Checker
4
4
  module Modules
5
5
  class Yaml < Base
6
- extensions 'yaml', 'yml'
6
+ extensions "yaml", "yml"
7
+
7
8
  private
8
- def check_one(file, opts = {})
9
+
10
+ def check_one(file, _opts = {})
9
11
  ret = begin
10
12
  YAML.load_file(file)
11
13
  Checker::Result.result(self, 0)
@@ -3,7 +3,7 @@ module Checker
3
3
  class << self
4
4
  def get_config(conf, default = nil)
5
5
  config = `git config checker.#{conf}`.chomp
6
- (config.empty? && !default.nil?) ? default : config
6
+ config.empty? && !default.nil? ? default : config
7
7
  end
8
8
 
9
9
  def modules_to_check
@@ -2,7 +2,7 @@ module Checker
2
2
  module Results
3
3
  class ConsoleLog < Default
4
4
  def success?
5
- (Checker::Options.prevent_commit_on_warning && exitstatus == 0) ? false : true
5
+ Checker::Options.prevent_commit_on_warning && exitstatus == 0 ? false : true
6
6
  end
7
7
 
8
8
  def status
@@ -2,14 +2,14 @@ module Checker
2
2
  class RVM
3
3
  class << self
4
4
  def rvm_command(command)
5
- rvm_gem = ENV['GEM_HOME'].to_s
5
+ rvm_gem = ENV["GEM_HOME"].to_s
6
6
  rvm_version = rvm_gem.gsub(/.+rvm\/gems\//, "")
7
7
 
8
8
  "#{rvm_shell} '#{rvm_version}' -c '#{command}'"
9
9
  end
10
10
 
11
11
  def rvm_shell
12
- File.join(ENV['rvm_path'].to_s, 'bin/rvm-shell')
12
+ File.join(ENV["rvm_path"].to_s, "bin/rvm-shell")
13
13
  end
14
14
  end
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module Checker
2
- VERSION = '0.7.0'
2
+ VERSION = "0.8.0.beta".freeze
3
3
  end
@@ -1,11 +1,13 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  module Checker
4
4
  module Modules
5
5
  class Bogus < Base
6
- extensions '.test'
6
+ extensions ".test"
7
+
7
8
  private
8
- def check_one(file)
9
+
10
+ def check_one(_file)
9
11
  true
10
12
  end
11
13
 
@@ -19,9 +21,9 @@ end
19
21
  describe Checker::CLI do
20
22
  context "running without arguments" do
21
23
  it "should run checks on modules from git config" do
22
- ARGV.stub(:size).and_return 0
23
- Checker::CLI.should_receive(:get_modules_to_check).and_return(["bogus"])
24
- Checker::CLI.should_receive(:exit).with(0).and_return true
24
+ allow(ARGV).to receive(:empty?).and_return true
25
+ expect(Checker::CLI).to receive(:get_modules_to_check).and_return(["bogus"])
26
+ expect(Checker::CLI).to receive(:exit).with(0).and_return true
25
27
  Checker::CLI.execute
26
28
  end
27
29
  end
@@ -29,8 +31,8 @@ describe Checker::CLI do
29
31
  context "running with argument" do
30
32
  it "should run check on modules from argument" do
31
33
  stub_const("ARGV", ["pry"])
32
- Checker::CLI.should_not_receive(:get_modules_to_check)
33
- Checker::CLI.should_receive(:exit).with(0).and_return true
34
+ expect(Checker::CLI).not_to receive(:get_modules_to_check)
35
+ expect(Checker::CLI).to receive(:exit).with(0).and_return true
34
36
  Checker::CLI.execute
35
37
  end
36
38
  end
@@ -1,2 +1 @@
1
- def test
2
- end
1
+ def test; end
@@ -1,4 +1,3 @@
1
1
  binding.pry
2
- def test
3
- end
2
+ def test; end
4
3
  binding.remote_pry
@@ -1,3 +1,3 @@
1
1
  def test
2
2
  binding.pry
3
- end
3
+ end
@@ -1,3 +1,3 @@
1
1
  def test
2
2
  binding.remote_pry
3
- end
3
+ end
@@ -1,2 +1 @@
1
- def test
2
- end
1
+ def test; end
@@ -1,3 +1,3 @@
1
1
  def test
2
- {some: 'random', hash: 'qwe'}
2
+ { some: "random", hash: "qwe" }
3
3
  end
@@ -1,52 +1,52 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe Checker::Modules::Base do
4
4
  describe "rvm_command method" do
5
5
  context "properly fetches the ruby version from the environment variables" do
6
6
  before do
7
- ENV.stub!(:[]).with("rvm_path").and_return "/Users/test/.rvm"
7
+ allow(ENV).to receive(:[]).with("rvm_path").and_return "/Users/test/.rvm"
8
8
  end
9
9
 
10
10
  it "uses no gemsets" do
11
- ENV.stub!(:[]).with("GEM_HOME").and_return "/Users/test/.rvm/gems/some_ruby_version"
11
+ allow(ENV).to receive(:[]).with("GEM_HOME").and_return "/Users/test/.rvm/gems/some_ruby_version"
12
12
 
13
- Checker::Modules::Base.new.send(:rvm_command, "test").should == "/Users/test/.rvm/bin/rvm-shell 'some_ruby_version' -c 'test'"
13
+ expect(Checker::Modules::Base.new.send(:rvm_command, "test")).to eq "/Users/test/.rvm/bin/rvm-shell 'some_ruby_version' -c 'test'"
14
14
  end
15
15
 
16
16
  it "uses global gemset" do
17
- ENV.stub!(:[]).with("GEM_HOME").and_return "/Users/test/.rvm/gems/some_ruby_version@global"
17
+ allow(ENV).to receive(:[]).with("GEM_HOME").and_return "/Users/test/.rvm/gems/some_ruby_version@global"
18
18
 
19
- Checker::Modules::Base.new.send(:rvm_command, "test").should == "/Users/test/.rvm/bin/rvm-shell 'some_ruby_version@global' -c 'test'"
19
+ expect(Checker::Modules::Base.new.send(:rvm_command, "test")).to eq "/Users/test/.rvm/bin/rvm-shell 'some_ruby_version@global' -c 'test'"
20
20
  end
21
21
 
22
22
  it "uses some other gemset" do
23
- ENV.stub!(:[]).with("GEM_HOME").and_return "/Users/test/.rvm/gems/some_ruby_version@v2"
23
+ allow(ENV).to receive(:[]).with("GEM_HOME").and_return "/Users/test/.rvm/gems/some_ruby_version@v2"
24
24
 
25
- Checker::Modules::Base.new.send(:rvm_command, "test").should == "/Users/test/.rvm/bin/rvm-shell 'some_ruby_version@v2' -c 'test'"
25
+ expect(Checker::Modules::Base.new.send(:rvm_command, "test")).to eq "/Users/test/.rvm/bin/rvm-shell 'some_ruby_version@v2' -c 'test'"
26
26
  end
27
27
  end
28
28
 
29
29
  context "using different rvm_path (system-wide rvm)" do
30
30
  before do
31
- ENV.stub!(:[]).with("rvm_path").and_return "/usr/lib/rvm"
31
+ allow(ENV).to receive(:[]).with("rvm_path").and_return "/usr/lib/rvm"
32
32
  end
33
33
 
34
34
  it "uses no gemsets" do
35
- ENV.stub!(:[]).with("GEM_HOME").and_return "/Users/test/.rvm/gems/some_ruby_version"
35
+ allow(ENV).to receive(:[]).with("GEM_HOME").and_return "/Users/test/.rvm/gems/some_ruby_version"
36
36
 
37
- Checker::Modules::Base.new.send(:rvm_command, "test").should == "/usr/lib/rvm/bin/rvm-shell 'some_ruby_version' -c 'test'"
37
+ expect(Checker::Modules::Base.new.send(:rvm_command, "test")).to eq "/usr/lib/rvm/bin/rvm-shell 'some_ruby_version' -c 'test'"
38
38
  end
39
39
 
40
40
  it "uses global gemset" do
41
- ENV.stub!(:[]).with("GEM_HOME").and_return "/Users/test/.rvm/gems/some_ruby_version@global"
41
+ allow(ENV).to receive(:[]).with("GEM_HOME").and_return "/Users/test/.rvm/gems/some_ruby_version@global"
42
42
 
43
- Checker::Modules::Base.new.send(:rvm_command, "test").should == "/usr/lib/rvm/bin/rvm-shell 'some_ruby_version@global' -c 'test'"
43
+ expect(Checker::Modules::Base.new.send(:rvm_command, "test")).to eq "/usr/lib/rvm/bin/rvm-shell 'some_ruby_version@global' -c 'test'"
44
44
  end
45
45
 
46
46
  it "uses some other gemset" do
47
- ENV.stub!(:[]).with("GEM_HOME").and_return "/Users/test/.rvm/gems/some_ruby_version@v2"
47
+ allow(ENV).to receive(:[]).with("GEM_HOME").and_return "/Users/test/.rvm/gems/some_ruby_version@v2"
48
48
 
49
- Checker::Modules::Base.new.send(:rvm_command, "test").should == "/usr/lib/rvm/bin/rvm-shell 'some_ruby_version@v2' -c 'test'"
49
+ expect(Checker::Modules::Base.new.send(:rvm_command, "test")).to eq "/usr/lib/rvm/bin/rvm-shell 'some_ruby_version@v2' -c 'test'"
50
50
  end
51
51
  end
52
52
  end
@@ -1,16 +1,16 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe Checker::Modules::Coffeescript do
4
- it 'should only check .coffee files' do
5
- files = ['a.rb', 'b.js.erb', 'c.r', 'd.yml', 'e.yaml', 'f.coffee']
4
+ it "should only check .coffee files" do
5
+ files = ["a.rb", "b.js.erb", "c.r", "d.yml", "e.yaml", "f.coffee"]
6
6
  mod = Checker::Modules::Coffeescript.new(files)
7
- mod.stub(:check_for_executable).and_return(true)
8
- mod.should_receive(:check_one_file).with('f.coffee').and_return(stub(:success? => true, :status => :ok))
9
- mod.should_not_receive(:check_one_file).with('e.yaml')
10
- mod.should_not_receive(:check_one_file).with('d.yml')
11
- mod.should_not_receive(:check_one_file).with('a.rb')
12
- mod.should_not_receive(:check_one_file).with('b.js.erb')
13
- mod.should_not_receive(:check_one_file).with('c.r')
14
- mod.check
7
+ expect(mod).to receive(:check_for_executable).and_return(true)
8
+ expect(mod).to receive(:check_one_file).with("f.coffee").and_return(double(success?: true, status: :ok))
9
+ expect(mod).not_to receive(:check_one_file).with("e.yaml")
10
+ expect(mod).not_to receive(:check_one_file).with("d.yml")
11
+ expect(mod).not_to receive(:check_one_file).with("a.rb")
12
+ expect(mod).not_to receive(:check_one_file).with("b.js.erb")
13
+ expect(mod).not_to receive(:check_one_file).with("c.r")
14
+ mod.check
15
15
  end
16
16
  end
@@ -1,23 +1,23 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe Checker::Modules::Conflict do
4
- it 'checks all files' do
5
- files = ['a.rb', 'b.js.erb', 'c.r', 'd.yaml', 'e.yml', 'f.coffee']
4
+ it "checks all files" do
5
+ files = ["a.rb", "b.js.erb", "c.r", "d.yaml", "e.yml", "f.coffee"]
6
6
  mod = Checker::Modules::Conflict.new(files)
7
- mod.stub(:check_one).and_return(stub(:success? => true, :status => :ok))
8
- mod.should_receive(:check_one).exactly(6).times
9
- mod.check
7
+ allow(mod).to receive(:check_one).and_return(double(success?: true, status: :ok))
8
+ expect(mod).to receive(:check_one).exactly(6).times
9
+ mod.check
10
10
  end
11
11
 
12
12
  it "does find git conflict" do
13
13
  files = [fixture("conflict", "with_conflict.rb")]
14
14
  mod = Checker::Modules::Conflict.new(files)
15
- mod.check.should be_false
15
+ expect(mod.check).to be_falsey
16
16
  end
17
17
 
18
18
  it "does not find git conflict" do
19
19
  files = [fixture("conflict", "without_conflict.rb")]
20
20
  mod = Checker::Modules::Conflict.new(files)
21
- mod.check.should be_true
21
+ expect(mod.check).to be_truthy
22
22
  end
23
23
  end
@@ -1,12 +1,12 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe Checker::Modules::ConsoleLog do
4
- it 'checks coffee and js files' do
5
- files = ['a.rb', 'b.js.erb', 'c.r', 'd.yaml', 'e.yml', 'f.coffee', 'g.js']
4
+ it "checks coffee and js files" do
5
+ files = ["a.rb", "b.js.erb", "c.r", "d.yaml", "e.yml", "f.coffee", "g.js"]
6
6
  mod = Checker::Modules::ConsoleLog.new(files)
7
- mod.stub(:check_one).and_return(stub(:success? => true, :status => :ok))
8
- mod.should_receive(:check_one).exactly(2).times
9
- mod.check
7
+ allow(mod).to receive(:check_one).and_return(double(success?: true, status: :ok))
8
+ expect(mod).to receive(:check_one).exactly(2).times
9
+ mod.check
10
10
  end
11
11
 
12
12
  describe "does find console.log" do
@@ -16,17 +16,17 @@ describe Checker::Modules::ConsoleLog do
16
16
  end
17
17
 
18
18
  it "results to be true if prevent_commit_on_warning is set to false" do
19
- Checker::Options.stub(:prevent_commit_on_warning).and_return(false)
20
- @mod.check.should be_true
19
+ allow(Checker::Options).to receive(:prevent_commit_on_warning).and_return(false)
20
+ expect(@mod.check).to be_truthy
21
21
  end
22
22
 
23
23
  it "results to be false if prevent_commit_on_warning is set to true" do
24
- Checker::Options.stub(:prevent_commit_on_warning).and_return(true)
25
- @mod.check.should be_false
24
+ allow(Checker::Options).to receive(:prevent_commit_on_warning).and_return(true)
25
+ expect(@mod.check).to be_falsey
26
26
  end
27
27
 
28
28
  it "prints proper message" do
29
- @mod.should_receive(:print_warning_message)
29
+ expect(@mod).to receive(:print_warning_message)
30
30
  @mod.check
31
31
  end
32
32
  end
@@ -38,11 +38,11 @@ describe Checker::Modules::ConsoleLog do
38
38
  end
39
39
 
40
40
  it "results to be true" do
41
- @mod.check.should be_true
41
+ expect(@mod.check).to be_truthy
42
42
  end
43
43
 
44
44
  it "prints proper message" do
45
- @mod.should_receive(:print_success_message)
45
+ expect(@mod).to receive(:print_success_message)
46
46
  @mod.check
47
47
  end
48
48
  end
@@ -1,18 +1,18 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe Checker::Modules::Haml do
4
- it 'should only check .haml files' do
5
- files = ['a.rb', 'b.js.erb', 'c.r', 'd.yml', 'e.yaml', 'f.coffee', 'g.haml']
4
+ it "should only check .haml files" do
5
+ files = ["a.rb", "b.js.erb", "c.r", "d.yml", "e.yaml", "f.coffee", "g.haml"]
6
6
  mod = Checker::Modules::Haml.new(files)
7
- mod.stub(:check_for_executable).and_return(true)
8
- mod.stub(:check_one_file).and_return(stub(:success? => true, :status => :ok))
9
- mod.should_receive(:check_one_file).with('g.haml')
10
- mod.should_not_receive(:check_one_file).with('f.coffee')
11
- mod.should_not_receive(:check_one_file).with('e.yaml')
12
- mod.should_not_receive(:check_one_file).with('d.yml')
13
- mod.should_not_receive(:check_one_file).with('a.rb')
14
- mod.should_not_receive(:check_one_file).with('b.js.erb')
15
- mod.should_not_receive(:check_one_file).with('c.r')
16
- mod.check
7
+ allow(mod).to receive(:check_for_executable).and_return(true)
8
+ allow(mod).to receive(:check_one_file).and_return(double(success?: true, status: :ok))
9
+ expect(mod).to receive(:check_one_file).with("g.haml")
10
+ expect(mod).not_to receive(:check_one_file).with("f.coffee")
11
+ expect(mod).not_to receive(:check_one_file).with("e.yaml")
12
+ expect(mod).not_to receive(:check_one_file).with("d.yml")
13
+ expect(mod).not_to receive(:check_one_file).with("a.rb")
14
+ expect(mod).not_to receive(:check_one_file).with("b.js.erb")
15
+ expect(mod).not_to receive(:check_one_file).with("c.r")
16
+ mod.check
17
17
  end
18
18
  end
@@ -1,26 +1,26 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe Checker::Modules::Javascript do
4
- it 'should only check .js files' do
5
- files = ['a.rb', 'b.js.erb', 'c.r', 'd.yml', 'e.yaml', 'f.coffee', 'g.haml', 'h.js']
4
+ it "should only check .js files" do
5
+ files = ["a.rb", "b.js.erb", "c.r", "d.yml", "e.yaml", "f.coffee", "g.haml", "h.js"]
6
6
  mod = Checker::Modules::Javascript.new(files)
7
- mod.stub(:check_for_executable).and_return(true)
8
- mod.should_receive(:check_one_file).with('h.js').and_return(stub(:success? => true, :status => :ok))
9
- mod.should_not_receive(:check_one_file).with('g.haml')
10
- mod.should_not_receive(:check_one_file).with('f.coffee')
11
- mod.should_not_receive(:check_one_file).with('e.yaml')
12
- mod.should_not_receive(:check_one_file).with('d.yml')
13
- mod.should_not_receive(:check_one_file).with('a.rb')
14
- mod.should_not_receive(:check_one_file).with('b.js.erb')
15
- mod.should_not_receive(:check_one_file).with('c.r')
16
- mod.check
7
+ allow(mod).to receive(:check_for_executable).and_return(true)
8
+ expect(mod).to receive(:check_one_file).with("h.js").and_return(double(success?: true, status: :ok))
9
+ expect(mod).not_to receive(:check_one_file).with("g.haml")
10
+ expect(mod).not_to receive(:check_one_file).with("f.coffee")
11
+ expect(mod).not_to receive(:check_one_file).with("e.yaml")
12
+ expect(mod).not_to receive(:check_one_file).with("d.yml")
13
+ expect(mod).not_to receive(:check_one_file).with("a.rb")
14
+ expect(mod).not_to receive(:check_one_file).with("b.js.erb")
15
+ expect(mod).not_to receive(:check_one_file).with("c.r")
16
+ mod.check
17
17
  end
18
18
 
19
19
  describe "good js file" do
20
20
  before do
21
- files = ['good.js']
21
+ files = ["good.js"]
22
22
  @mod = Checker::Modules::Javascript.new(files)
23
- @mod.should_receive(:check_one_file).with('good.js').and_return(stub(:success? => true, :status => :ok))
23
+ expect(@mod).to receive(:check_one_file).with("good.js").and_return(double(success?: true, status: :ok))
24
24
  end
25
25
 
26
26
  xit "results to be true" do
@@ -28,16 +28,16 @@ describe Checker::Modules::Javascript do
28
28
  end
29
29
 
30
30
  xit "prints proper message" do
31
- @mod.should_receive(:print_success_message)
31
+ expect(@mod).to receive(:print_success_message)
32
32
  @mod.check
33
33
  end
34
34
  end
35
35
 
36
36
  describe "js with warnings" do
37
37
  before do
38
- files = ['warning.js']
38
+ files = ["warning.js"]
39
39
  @mod = Checker::Modules::Javascript.new(files)
40
- @mod.should_receive(:check_one_file).with('warning.js').and_return(stub(:success? => true, :status => :warning))
40
+ expect(@mod).to receive(:check_one_file).with("warning.js").and_return(double(success?: true, status: :warning))
41
41
  end
42
42
 
43
43
  xit "results to be true" do
@@ -45,16 +45,16 @@ describe Checker::Modules::Javascript do
45
45
  end
46
46
 
47
47
  xit "prints proper message" do
48
- @mod.should_receive(:print_warning_message)
48
+ expect(@mod).to receive(:print_warning_message)
49
49
  @mod.check
50
50
  end
51
51
  end
52
52
 
53
53
  describe "bad js with errors" do
54
54
  before do
55
- files = ['bad.js']
55
+ files = ["bad.js"]
56
56
  @mod = Checker::Modules::Javascript.new(files)
57
- @mod.should_receive(:check_one_file).with('bad.js').and_return(stub(:success? => false, :status => :fail))
57
+ expect(@mod).to receive(:check_one_file).with("bad.js").and_return(double(success?: false, status: :fail))
58
58
  end
59
59
 
60
60
  xit "results to be true" do
@@ -62,7 +62,7 @@ describe Checker::Modules::Javascript do
62
62
  end
63
63
 
64
64
  xit "prints proper message" do
65
- @mod.should_receive(:print_fail_message)
65
+ expect(@mod).to receive(:print_fail_message)
66
66
  @mod.check
67
67
  end
68
68
  end