Thanks David...I am using jRuby on Rails1.5.0 and following are the
details of gems:-
rails-2.3.5
rspec-1.3.0
rspec-rails-1.3.2
My script needs to test the create channel method based on a condition
given by checkChannel? which I have stubbed as true.If true it should
render the action createchann
I worked this out
In the view spec you need to do something like this:
describe "users/index.html.haml" do
before do
# this is the bit you need
view.stub!(:abc).and_return(whatever_your_helper_returns)
# end of the bit you need
render
end
it "stuff" do
rendere
I'm a newcomer to the list. Appologies if this has been discussed before,
but all I could find with regards to specing scopes relates to those that
filter records or apply sorting. What's the best way to spec a scope that
uses the includes method? For instance:
class Location < ActiveRecord.Base
David:
Wow, that's just about the perfect example of a coding help forum
reply:
Specifically identifies what's going wrong.
Suggests a simple solution.
Identifies the deeper underlying problem (code that's too bloated,
tightly-coupled, or whatever, and thus hard to test)
Gently offers a detailed
On Jul 12, 2011, at 4:36 AM, Chandu80 wrote:
> Hello All,
> I am a rspec beginner
Welcome!
> and I am trying to find a way out to write
> render expectation in controller spec. I used the following ways
> render '/channels/createchannel.html.erb'
> view.should_receive(:render).with(:action => "c
Hello All,
I am a rspec beginner and I am trying to find a way out to write
render expectation in controller spec.I used the following ways
render '/channels/createchannel.html.erb'
view.should_receive(:render).with(:action => "createchannel")
ChannelsController.expect_render(:action => "createchan
Thank you for the info :)
Regards
Chandrika
On Jul 11, 7:00 am, Justin Ko wrote:
> On Fri, Jul 8, 2011 at 2:59 AM, Chandu80 wrote:
> > Hello All,
> > I want to know which out of Rspec and Test:Unit is the most used in
> > the industry for unit/integration testing and why?
>
> http://22ideastre