spec/checker/modules/conflict_spec.rb in checker-0.7.0 vs spec/checker/modules/conflict_spec.rb in checker-0.8.0.beta
- old
+ new
@@ -1,23 +1,23 @@
-require 'spec_helper'
+require "spec_helper"
describe Checker::Modules::Conflict do
- it 'checks all files' do
- files = ['a.rb', 'b.js.erb', 'c.r', 'd.yaml', 'e.yml', 'f.coffee']
+ it "checks all files" do
+ files = ["a.rb", "b.js.erb", "c.r", "d.yaml", "e.yml", "f.coffee"]
mod = Checker::Modules::Conflict.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 "does find git conflict" do
files = [fixture("conflict", "with_conflict.rb")]
mod = Checker::Modules::Conflict.new(files)
- mod.check.should be_false
+ expect(mod.check).to be_falsey
end
it "does not find git conflict" do
files = [fixture("conflict", "without_conflict.rb")]
mod = Checker::Modules::Conflict.new(files)
- mod.check.should be_true
+ expect(mod.check).to be_truthy
end
end