Each "it" runs in isolation. The flow is, all the "before" blocks run in order
from outer to inner, before each "it" block.
You can think of each "it" expectation as sending you to the start, to test
another isolated expectation about the process.
This is good, because a failure in one part of t
On Apr 27, 2011, at 3:55 PM, Sergio Ruiz wrote:
> i am setting up a few objects that are interrelated for use in an rspec
> test..
>
> something like:
>
> describe Dimension do
>
> before(:each) do
> text = "string here"
> end
>
> it "should puts string" do
> puts text
> end
>
> end
>
> when
On Apr 27, 2011, at 6:40 AM, David Chelimsky wrote:
>
> On Apr 26, 2011, at 5:39 PM, Matthew Van Horn wrote:
>
>>
>> On Apr 26, 2011, at 4:02 PM, Rodrigo Rosenfeld Rosas wrote:
>>
>>> Ok, now I understand what is your issue.
>>>
>>
On Apr 26, 2011, at 4:02 PM, Rodrigo Rosenfeld Rosas wrote:
> Ok, now I understand what is your issue.
>
class Foo
end
class Bar
def self.my_foo
@my_foo ||= Foo.new
end
def self.perform
my_foo.do_something
end
end
On Apr 25, 2011, at 11:30 PM, Rodrigo Rosenfeld Rosas wrote:
> Em 25-04-2011 14:58, Matthew Van Horn escreveu:
>>
>>
>> On Apr 25, 2011, at 1:36 PM, Matthew Van Horn wrote:
>>
>>> I've run into some strange behavior in porting my specs from rspec t
On Apr 25, 2011, at 1:36 PM, Matthew Van Horn wrote:
> I've run into some strange behavior in porting my specs from rspec to rspec2.
> I am wondering if I am doing something wrong, or if I've misunderstood
> something, or if this is some kind of bug.
>
> Look at
I've run into some strange behavior in porting my specs from rspec to rspec2.
I am wondering if I am doing something wrong, or if I've misunderstood
something, or if this is some kind of bug.
Look at the specs below: a
Both examples will pass if run singly.
The second one will fail if I run both
On Apr 23, 2011, at 11:45 AM, David Chelimsky wrote:
> On Apr 23, 2011, at 10:26 AM, Matthew Van Horn wrote:
>
>> On Apr 23, 2011, at 10:40 AM, Matthew Van Horn wrote:
>>
>>> def self.nullify_contextually?(other)
>>> rspec_root = defined?(RSpe
On Apr 23, 2011, at 10:40 AM, Matthew Van Horn wrote:
> def self.nullify_contextually?(other)
> rspec_root = defined?(RSpec) ? RSpec : Spec
> if defined? rspec_root::Rails::RailsExampleGroup
> other.ancestors.include?(rspec_root::Rails::RailsExampleGroup
I'm in the midst of upgrading an app from Rails 2.3 to Rails 3, and as part of
the process, from RSpec to RSpec2.
One thing that seems to have broken for me is the use of NullDB to nullify the
database contextually for a single spec.
I think I've narrowed it down to this method in NullDB which a
I also ran into this today. Not sure where the "contain" matcher is,
looked in rspec-rails and rspec-expectations, but came up empty.
(Rails 3.0.0 / Rspec 2.0.0)
-- matt
On Oct 18, 2010, at 5:53 PM, Stephen Veit wrote:
On Oct 18, 3:41 pm, David Chelimsky wrote:
On Oct 18, 2010, at 3:27 PM,
I've been using rspec with webrat, for exactly this sort of thing, as
detailed here: http://blog.veez.us/2009/09/11/integration-testing-without-cucumber
On Apr 27, 2010, at 5:36 AM, Martin DeMello wrote:
I have a series of tests I want to automate, which involve running
shell scripts in a "l
I've just gotten started refactoring my app to use Resque/Redis to do
things like email and order capture asynchronously.
I'm wondering if anyone has any tips on how to test my job classes,
and how to run integration tests for this kind of thing.
BTW - we're a very small group, and the tests
On May 18, 2009, at 3:08 PM, Ben Mabey wrote:
Matthew Van Horn wrote:
I'm probably missing something really obvious, but I just upgraded
cucumber, rspec/rails, and webrat on a project, and for some
reason, cucumber is not seeing any of the webrat steps (or bmabey's
email s
On May 18, 2009, at 2:49 PM, Matthew Van Horn wrote:
I'm probably missing something really obvious, but I just upgraded
cucumber, rspec/rails, and webrat on a project, and for some reason,
cucumber is not seeing any of the webrat steps (or bmabey's email
steps) when running from
I'm probably missing something really obvious, but I just upgraded
cucumber, rspec/rails, and webrat on a project, and for some reason,
cucumber is not seeing any of the webrat steps (or bmabey's email
steps) when running from rake. It seems ok when running using the
cucumber binary.
The
Just started getting this, every time I run rake features:
myapp/vendor/rails/actionpack/lib/action_controller/vendor/rack-1.0/
rack/lint.rb:16: [BUG] Segmentation fault
ruby 1.8.6 (2008-03-03) [i686-darwin9.2.2]
after updating from cucumber 0.3.0 to 0.3.2 I'm now getting the
segfault here:
plementation or the Geolp one.
Pat
On Sunday, May 3, 2009, Matthew Van Horn
wrote:
I'm just curious about this, since my solution involved stubbing a
call to GeoIp.
Is there a good rule of thumb for when you make exceptions to the
'no stubbing' philosophy of Cucumber?
My s
I followed Bryan's pattern here, and let RSpec reset everything.
http://www.brynary.com/2009/2/3/cucumber-step-definition-tip-stubbing-time
On May 4, 2009, at 3:13 AM, aslak hellesoy wrote:
One thing to be aware of when stubbing: There is no cleanup/revert
logic yet in Cucumber. This means
I have this in my webrat_steps.rb already:
Then /^I should be on (.+)$/ do |page_name|
URI.parse(current_url).path.should == path_to(page_name)
end
(I think it came that way)
-- Matt
On May 3, 2009, at 8:37 PM, Mark Wilden wrote:
On Sun, May 3, 2009 at 11:28 AM, Tim Fischbach
wrote:
is
I'm just curious about this, since my solution involved stubbing a
call to GeoIp.
Is there a good rule of thumb for when you make exceptions to the 'no
stubbing' philosophy of Cucumber?
My step was: "Given I am accessing the site from Japan," but I can
think of other situations - mostly w
21 matches
Mail list logo