Skip to content

Commit

Permalink
Merge pull request objects-on-rails#19 from AlexParamonov/fix_test_fi…
Browse files Browse the repository at this point in the history
…xtures

Fix test fixtures
  • Loading branch information
codeodor committed Nov 7, 2012
2 parents da4dbb0 + b1233a9 commit 9ca2774
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion spec/fixtures/exhibits/link_exhibit.rb
Expand Up @@ -2,7 +2,7 @@
class LinkExhibit < DisplayCase::Exhibit
RELATIONS = %w[next prev up]

def self.applicable_to?(object)
def self.applicable_to?(object, context=nil)
object_is_any_of?(object, 'Post')
end

Expand Down
6 changes: 3 additions & 3 deletions spec/fixtures/exhibits/nil_exhibit.rb
@@ -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
2 changes: 1 addition & 1 deletion spec/fixtures/exhibits/picture_post_exhibit.rb
@@ -1,7 +1,7 @@
require_relative 'post_exhibit'

class PicturePostExhibit < PostExhibit
def self.applicable_to?(object)
def self.applicable_to?(object, context=nil)
super && object.picture?
end

Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/exhibits/post_exhibit.rb
Expand Up @@ -3,7 +3,7 @@

class PostExhibit < DisplayCase::Exhibit
include ::Conversions
def self.applicable_to?(object)
def self.applicable_to?(object, context=nil)
object_is_any_of?(object, 'Post')
end

Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/exhibits/tag_list_exhibit.rb
@@ -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
2 changes: 1 addition & 1 deletion spec/fixtures/exhibits/text_post_exhibit.rb
@@ -1,6 +1,6 @@
require_relative 'post_exhibit'
class TextPostExhibit < PostExhibit
def self.applicable_to?(object)
def self.applicable_to?(object, context=nil)
super && (!object.picture?)
end

Expand Down

0 comments on commit 9ca2774

Please sign in to comment.