forked from objects-on-rails/display-case
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 objects-on-rails#19 from AlexParamonov/fix_test_fi…
…xtures Fix test fixtures
- Loading branch information
Showing
6 changed files
with
8 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
class NilExhibit < DisplayCase::Exhibit | ||
def self.applicable_to?(object) | ||
def self.applicable_to?(object, context=nil) | ||
object.class.name == 'String' || object.nil? | ||
end | ||
|
||
def name | ||
if __getobj__.nil? | ||
return "I am nil!" | ||
else | ||
return "I am not nil!" | ||
end | ||
end | ||
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require_relative '../../../lib/display_case' | ||
|
||
class TagListExhibit < DisplayCase::Exhibit | ||
def self.applicable_to?(object) | ||
def self.applicable_to?(object, context=nil) | ||
object_is_any_of?(object, 'TagList') | ||
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