Doc updates
This commit is contained in:
parent
dab4badd0b
commit
6bc83d72a0
|
@ -73,7 +73,7 @@ Quick macro tests for your ActiveRecord associations and validations:
|
||||||
|
|
||||||
Makes TDD so much easier.
|
Makes TDD so much easier.
|
||||||
|
|
||||||
=== Controller Tests (ThoughtBot::Shoulda::Controller::ClassMethods)
|
=== Controller Tests (ThoughtBot::Shoulda::Controller::Macros)
|
||||||
|
|
||||||
Macros to test the most common controller patterns...
|
Macros to test the most common controller patterns...
|
||||||
|
|
||||||
|
@ -109,7 +109,6 @@ should_be_restful generates 40 tests on the fly, for both html and xml requests.
|
||||||
|
|
||||||
More to come here, but have fun with what's there.
|
More to come here, but have fun with what's there.
|
||||||
|
|
||||||
load_all_fixtures
|
|
||||||
assert_same_elements([:a, :b, :c], [:c, :a, :b])
|
assert_same_elements([:a, :b, :c], [:c, :a, :b])
|
||||||
assert_contains(['a', '1'], /\d/)
|
assert_contains(['a', '1'], /\d/)
|
||||||
assert_contains(['a', '1'], 'a')
|
assert_contains(['a', '1'], 'a')
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module ThoughtBot
|
module ThoughtBot # :nodoc:
|
||||||
module Shoulda
|
module Shoulda # :nodoc:
|
||||||
module ActionMailer
|
module ActionMailer # :nodoc:
|
||||||
module Assertions
|
module Assertions
|
||||||
# Asserts that an email was delivered. Can take a block that can further
|
# Asserts that an email was delivered. Can take a block that can further
|
||||||
# narrow down the types of emails you're expecting.
|
# narrow down the types of emails you're expecting.
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
module Thoughtbot
|
module Thoughtbot # :nodoc:
|
||||||
module Shoulda
|
module Shoulda
|
||||||
VERSION = '1.1.1'
|
VERSION = '1.1.1'
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
attr_accessor :contexts
|
attr_accessor :contexts
|
||||||
def contexts
|
def contexts # :nodoc:
|
||||||
@contexts ||= []
|
@contexts ||= []
|
||||||
end
|
end
|
||||||
|
|
||||||
def current_context
|
def current_context # :nodoc:
|
||||||
self.contexts.last
|
self.contexts.last
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_context(context)
|
def add_context(context) # :nodoc:
|
||||||
self.contexts.push(context)
|
self.contexts.push(context)
|
||||||
end
|
end
|
||||||
|
|
||||||
def remove_context
|
def remove_context # :nodoc:
|
||||||
self.contexts.pop
|
self.contexts.pop
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue