Hi Seth,
To get around this, are you able to test the response.headers
collection? This tests the code that you wrote, rather than the
template logic performed by rails.
response.headers['Content-Type'].should == "text/html"
Untested, of course... but it may work :)
Hi Glen,
I do not mean to insult you, but is /session/create actually doing a
redirect? A similar rspec test works for me.
--
Matt Berther
http://www.mattberther.com
On Mar 26, 2008, at 5:51 PM, Glenn Ford wrote:
> On Mar 26, 2008, at 6:28 PM, Chuck Remes wrote:
>
>>
>&g
been
doing it for a while.
--
Matt Berther
http://www.mattberther.com
On Mar 31, 2008, at 6:21 PM, Tim Haines wrote:
Hi there,
A couple of complete newb questions here.
Should I be spec'ing the existence of attributes on models? While
reading through the docs and googling I have
e_error_on(:name, :taken)
end
end
--
Matt Berther
http://www.mattberther.com
On Apr 2, 2008, at 2:13 AM, Juanma Cervera wrote:
> Hello
>
> I am learning rspec and trying to especify the activerecord
> validations
> of my models.
>
> How would I make a require_unique
s such a discrepancy
> between environments in the outcome of my tests.
>
> Thanks heaps!
> Giuseppe
> --
> Posted via http://www.ruby-forum.com/.
> ___
> rspec-users mailing list
> rspec-users@rubyforge.org
>
nd
it "should assign to the model" do
get '/'
assigns[:model].should == model
end
it "should render feed template" do
get '/'
response.should render_template('feeds/model_feed.xml.erb')
end
end
Obviously, bot
;/'
> > response.should render_template('feeds/model_feed.xml.erb')
> >end
> > end
>
> This test would be valuable in a context where the XML feed output is
> complex. In that case, testing the output directly might not
> sufficiently enab
Hi Andrea,
I generally put stub! calls in the before block and then have the mock
expectation in the example block.
--
Matt Berther
http://www.mattberther.com
On Apr 29, 2008, at 5:59 AM, Andrea Fazzi wrote:
Hi all,
consider a class Foo that send, in its constructor, some message to
Hi Andrew,
I've been using rspactor (the command line version) and really prefer
it to autotest. If you're using a Mac, you may want to look at this.
--
Matt Berther
http://www.mattberther.com
On May 3, 2008, at 1:36 PM, Andrew Brown wrote:
I will, once I resolve the error.