Hello.
Is it possible to also use the transactional examples feature for gem
(not Rails) development. It seems that one has to require "rspec-
rails", but I still can't get it to work.
I added this to my spec_helper.rb:
RSpec.configure do |config|
config.use_transactional_fixtures = true
end
A
> That's my 2ยข, but feel free to try to convince me otherwise :)
Ok, I'll give my best ... how about a dollar? ;-)
> I understand that chains like this are common in Rails apps thanks to good
> ideas like composable finders (which generally do not violate Demeter), but I
> don't think the paral
David, sorry for double posting (it seems I am working too much and
forgetting about what I already asked) ... and thanks for your answer.
How about a bit more convenient way for future releases. Something
like:
MyModel.stub_chain(:tag_counts, { :offset =>
0 }, :limit, :order).and_return([])
it cou
Hello.
I am trying to test if in a method calling chain one of the methods
get a specific parameter. In the below code for example MyModel must
receive the parameter 0 for the method `offset`. Unfortunately the
code below does not work. It seems it is not possible to mix
should_receive and stub_ch
Hello.
I am trying to test if in a method calling chain one of the methods
get a specific parameter. In the below code for example MyModel must
receive the parameter 0 for the method "offset". Unfortunately the
code below does not work. It seems it is not possible to mix
should_receive and stub_ch
> Can I ask why you want this outside controller and/or request specs?
Of course. I'd like to test some web services and XMLHttpRequests with
Steak. For that I need the post and xhr methods of the request
helpers. Steak uses an acceptance folder where the request helpers are
not available. I wonde
I just solved the problem by including the below code in my acceptance
helper. If you are not Steak then just simply put it in spec helper or
require it from somewhere else. post and xhr methods are now available
in that spec regardless in what spec it is or in what directory you
are.
The code is