Skip to content

Commit

Permalink
Adds specs for private method handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendan Loudermilk committed Jan 9, 2012
1 parent 97ffd04 commit 9235a38
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/acts_as_async/helper_spec.rb
Expand Up @@ -295,6 +295,14 @@
Model.async_lol_in interval, "foo", "bar"
end
end

context "when the matched method is private" do
let (:model) { Model.create }

it "should still work" do
lambda { model.async_a_private_method }.should_not raise_error
end
end
end

context "when the extracted method doesn't exist" do
Expand Down
5 changes: 5 additions & 0 deletions spec/models.rb
Expand Up @@ -8,4 +8,9 @@ def self.lol(foo = "hah", bar = "heh")
def smash!(value = "SMASHED")
update_attribute :name, value
end

private

def a_private_method; end

end

0 comments on commit 9235a38

Please sign in to comment.