spec/checker/modules/pry_spec.rb in checker-0.7.0 vs spec/checker/modules/pry_spec.rb in checker-0.8.0.beta
- old
+ new
@@ -1,35 +1,35 @@
-require 'spec_helper'
+require "spec_helper"
describe Checker::Modules::Pry do
- it 'should check all files' do
- files = ['a.rb', 'b.js.erb', 'c.r', 'd.yaml', 'e.yml', 'f.coffee']
+ it "should check all files" do
+ files = ["a.rb", "b.js.erb", "c.r", "d.yaml", "e.yml", "f.coffee"]
mod = Checker::Modules::Pry.new(files)
- mod.stub(:check_one).and_return(stub(:success? => true, :status => :ok))
- mod.should_receive(:check_one).exactly(6).times
- mod.check
+ allow(mod).to receive(:check_one).and_return(double(success?: true, status: :ok))
+ expect(mod).to receive(:check_one).exactly(6).times
+ mod.check
end
it "should not find the pry or remote_pry" do
files = [fixture("pry", "without_pry.rb")]
mod = Checker::Modules::Pry.new(files)
- mod.check.should be_true
+ expect(mod.check).to be true
end
it "should find the pry or remote_pry" do
files = [fixture("pry", "with_pry.rb")]
mod = Checker::Modules::Pry.new(files)
- mod.check.should be_false
+ expect(mod.check).to be false
end
it "should find the pry or remote_pry" do
files = [fixture("pry", "with_pry_remote.rb")]
mod = Checker::Modules::Pry.new(files)
- mod.check.should be_false
+ expect(mod.check).to be false
end
it "should find the pry or remote_pry" do
files = [fixture("pry", "with_both.rb")]
mod = Checker::Modules::Pry.new(files)
- mod.check.should be_false
+ expect(mod.check).to be false
end
end