Skip to content

Commit

Permalink
Merge pull request #6 from pocke/update-rspec-3
Browse files Browse the repository at this point in the history
Update RSpec version to 3
  • Loading branch information
flyerhzm committed Aug 7, 2016
2 parents f703ae3 + 4acf47c commit b333a13
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--format nested
--format documentation
--color
4 changes: 2 additions & 2 deletions spec/code_analyzer/checker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ module CodeAnalyzer
context "#parse_file?" do
it "should return true if node_file matches pattern" do
allow(checker).to receive(:interesting_files).and_return([/spec\/.*\.rb/, /lib\/.*\.rb/])
expect(checker.parse_file?("lib/code_analyzer.rb")).to be_true
expect(checker.parse_file?("lib/code_analyzer.rb")).to be true
end

it "should return false if node_file doesn't match pattern" do
allow(checker).to receive(:interesting_files).and_return([/spec\/.*\.rb/])
expect(checker.parse_file?("lib/code_analyzer.rb")).to be_false
expect(checker.parse_file?("lib/code_analyzer.rb")).to be false
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/code_analyzer/checking_visitor/plain_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module CodeAnalyzer::CheckingVisitor
content = "content"
expect(checker1).to receive(:parse_file?).and_return(false)
expect(checker2).to receive(:parse_file?).and_return(true)
checker1.should_not_receive(:check).with(filename, content)
expect(checker1).not_to receive(:check).with(filename, content)
expect(checker2).to receive(:check).with(filename, content)

visitor.check(filename, content)
Expand Down

0 comments on commit b333a13

Please sign in to comment.