-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from dustMason/master
Should not mutate options[:file_name]
- Loading branch information
Showing
7 changed files
with
81 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
RSpec::Matchers.define :warn do |message| | ||
match do |block| | ||
fake_stderr(&block).include? message | ||
end | ||
|
||
description do | ||
"warn \"#{message}\"" | ||
end | ||
|
||
failure_message_for_should do | ||
"expected to #{description}" | ||
end | ||
|
||
failure_message_for_should_not do | ||
"expected to not #{description}" | ||
end | ||
|
||
def fake_stderr | ||
original_stderr = $stderr | ||
$stderr = StringIO.new | ||
yield | ||
$stderr.string | ||
ensure | ||
$stderr = original_stderr | ||
end | ||
|
||
def supports_block_expectations? | ||
true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
class User < ActiveRecord::Base | ||
def username | ||
'batman' | ||
end | ||
attr_accessor :username | ||
end | ||
|
||
class MongoidModel | ||
|