Hello,
I'm new to rails and I'm trying to wrap my heads around how to spec
controllers using RSpec (using rails 3rc1 and rspec 2.0.0.beta.19).
The problem I've run into is when I want to test that my controllers respond
with a 404 for unfound records.
Whenever I run the spec, the ActiveRecor
On Sun, Aug 8, 2010 at 3:53 PM, Phillip Koebbe wrote:
> Here's another idea that's not so great, but maybe it will spur some
> thinking in someone else. What about a custom generator (or a flag on the
> official one) that added something like a shebang line at the beginning of
> example files. A s
On Aug 8, 2010, at 11:58 AM, Myron Marston wrote:
> Good error messages are important to a library's usability. Could we
> find away to give the user a good error message when they override a
> "reserved method"?
>
> I'm thinking this could be accomplished with 2 simple pieces:
>
> 1. A method_
On Aug 8, 2010, at 11:13 AM, Matt Wynne wrote:
>
> On 8 Aug 2010, at 16:53, David Chelimsky wrote:
>
>> On Aug 8, 2010, at 10:40 AM, Matt Wynne wrote:
>>> On 8 Aug 2010, at 16:38, David Chelimsky wrote:
On Aug 7, 2010, at 4:10 PM, David Chelimsky wrote:
> Hey all,
>
> It
On 2010-08-08 6:11 AM, Ashley Moran wrote:
On Aug 08, 2010, at 2:17 am, Phillip Koebbe wrote:
I have developed a system in which I require model_helper.rb in model specs,
controller_helper.rb in controllers, and (you guessed it!) view_helper.rb in
view specs. Each of those then require spec_
Good error messages are important to a library's usability. Could we
find away to give the user a good error message when they override a
"reserved method"?
I'm thinking this could be accomplished with 2 simple pieces:
1. A method_added hook in Rspec-core that gives a warning or error
when a res
On 8 Aug 2010, at 16:53, David Chelimsky wrote:
> On Aug 8, 2010, at 10:40 AM, Matt Wynne wrote:
>> On 8 Aug 2010, at 16:38, David Chelimsky wrote:
>>> On Aug 7, 2010, at 4:10 PM, David Chelimsky wrote:
>>>
Hey all,
It turns out that if you have
* Rails (2 or 3)
*
On Aug 8, 2010, at 10:40 AM, Matt Wynne wrote:
> On 8 Aug 2010, at 16:38, David Chelimsky wrote:
>> On Aug 7, 2010, at 4:10 PM, David Chelimsky wrote:
>>
>>> Hey all,
>>>
>>> It turns out that if you have
>>>
>>> * Rails (2 or 3)
>>> * Ruby-1.9
>>> * a model named Message
>>> * let(:message) or
On Aug 8, 2010, at 8:05 AM, Ashley Moran wrote:
> On 8 Aug 2010, at 12:05, Matt Wynne wrote:
>
>>> And you override it using let(:foo), which would be a perfectly reasonable
>>> way to handle it. In fact, it would be the way I would handle in
>>> instinctively, because now I don't have to wrote
On 8 Aug 2010, at 16:38, David Chelimsky wrote:
> On Aug 7, 2010, at 4:10 PM, David Chelimsky wrote:
>
>> Hey all,
>>
>> It turns out that if you have
>>
>> * Rails (2 or 3)
>> * Ruby-1.9
>> * a model named Message
>> * let(:message) or def message in an example group
>> * a Rails assertion in
On Aug 7, 2010, at 4:10 PM, David Chelimsky wrote:
> Hey all,
>
> It turns out that if you have
>
> * Rails (2 or 3)
> * Ruby-1.9
> * a model named Message
> * let(:message) or def message in an example group
> * a Rails assertion in an example in that group
> * note that rspec-rails' matchers
On Sun, Aug 8, 2010 at 7:11 AM, Ashley Moran
wrote:
> I just double checked, and spec_helper.rb isn't considered an RSpec file -
> and actually, I don't think it should be. Also, I have a spec/support folder
> in most projects, with matchers etc. They aren't RSpec files either. So
> this rou
On 8 Aug 2010, at 12:05, Matt Wynne wrote:
>> And you override it using let(:foo), which would be a perfectly reasonable
>> way to handle it. In fact, it would be the way I would handle in
>> instinctively, because now I don't have to wrote my own memoization handling
>> into the method.
>
>
On Aug 08, 2010, at 2:17 am, Phillip Koebbe wrote:
> I have developed a system in which I require model_helper.rb in model specs,
> controller_helper.rb in controllers, and (you guessed it!) view_helper.rb in
> view specs. Each of those then require spec_helper.rb. I did this because I
> wante
On Aug 08, 2010, at 12:00 am, David Chelimsky wrote:
> Yes:
> http://github.com/rspec/rspec-core/commit/c2e8a3947321e501b84113c1b2b1049df4868f4b
Cool, ta :) I'll update my code shortly.
Cheers
Ash
--
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
__
On 7 Aug 2010, at 23:18, David Chelimsky wrote:
> On Aug 7, 2010, at 4:37 PM, Ashley Moran wrote:
>
>> On 7 Aug 2010, at 22:10, David Chelimsky wrote:
>>
>>> So - what should we do? I don't think changing Minitest is really an
>>> option, as too many assertion libraries already wrap Minitest a
16 matches
Mail list logo