Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge commit 'cwninja/bugfixes'

  • Loading branch information...
commit 40568e730c782718a99a56ceb29ca894f7bd605d 2 parents c17e4fe + acbbe7d
@qrush qrush authored
Showing with 6 additions and 1 deletion.
  1. +1 −1  lib/shoulda/context.rb
  2. +5 −0 test/other/should_test.rb
View
2  lib/shoulda/context.rb
@@ -59,7 +59,7 @@ module ClassMethods
def should(name, options = {}, &blk)
if Shoulda.current_context
- block_given? ? Shoulda.current_context.should(name, options, &blk) : Should.current_context.should_eventually(name)
+ block_given? ? Shoulda.current_context.should(name, options, &blk) : Shoulda.current_context.should_eventually(name)
else
context_name = self.name.gsub(/Test/, "")
context = Shoulda::Context.new(context_name, self) do
View
5 test/other/should_test.rb
@@ -15,6 +15,10 @@ def self.should_see_class_methods
end
end
+ def self.should_be_able_to_setup_a_should_eventually_in_a_class_method
+ should "be able to setup a should eventually in a class method"
+ end
+
def self.should_see_a_context_block_like_a_Test_Unit_class
should "see a context block as a Test::Unit class" do
assert_equal "ShouldTest", self.class.name
@@ -46,6 +50,7 @@ def self.should_be_able_to_make_context_macros(prefix = nil)
should_see_class_methods
should_see_a_context_block_like_a_Test_Unit_class
should_be_able_to_make_context_macros("Context ")
+ should_be_able_to_setup_a_should_eventually_in_a_class_method
should "not define @blah" do
assert ! self.instance_variables.include?("@blah")
Please sign in to comment.
Something went wrong with that request. Please try again.