[rspec-users] Color not displaying when using an autowatchr script

2010-10-15 Thread Andrew Timberlake
When running RSpec 2.0.0.beta22, I would get colour output in the console from my specs Now, with 2.0.0 no color is used. If I run the rspec command directly, color is displaying again. I have --color in my .rspec file Andrew Timberlake ___ rspec-users

Re: [rspec-users] Can I set subject to its own method call?

2012-01-05 Thread Andrew Timberlake
Why don't you use let: describe MyClass do # Will set subject to an instance of MyClass context '#parse_input' do let(:input) { subject.parse_input } # calling input in your specs will now return the result of parse_input it 'is a hash' do input.shoul

Re: [rspec-users] nested route not receiving :id parameter within controller spec

2012-02-06 Thread Andrew Timberlake
The id belongs to post so your test line should be: post :share, :post_id => @post.id Andrew On Tuesday 07 February 2012 at 3:45 AM, Patrick J. Collins wrote: > I've got a share method in my controller, and I have the following spec: > > describe PostsController do > > describe "#share" do

Re: [rspec-users] nested route not receiving :id parameter within controller spec

2012-02-06 Thread Andrew Timberlake
Sorry, too quick to answer. Next clue is the fact that the RSpec error is ignoring your id attribute. try: post :share, :id => 42 and see if that gets you past the current error Andrew On Tuesday 07 February 2012 at 7:05 AM, Patrick J. Collins wrote: > I tried that and got the same result, plus

[rspec-users] Help with some basics

2009-04-30 Thread Andrew Timberlake
I'm suddenly getting an error on my specs /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/lib/spec/example/example_methods.rb:24:in `description': No description supplied for example declared on /home/andrew/dev/rhythm/website/spec/models/product_template_spec.rb:4 (Spec::Example::NoDescriptionError

Re: [rspec-users] Help with some basics

2009-04-30 Thread Andrew Timberlake
It gives me the same error when I run rake spec spec specs/ or autospec It also gives the same error with specs like it { should_not be_nil } and it { should respond_to(:name) } On Thursday, April 30, 2009, David Chelimsky wrote: > On Thu, Apr 30, 2009 at 9:44 AM, Andrew Timberlake >

Re: [rspec-users] Help with some basics

2009-04-30 Thread Andrew Timberlake
On Thu, Apr 30, 2009 at 10:04 PM, David Chelimsky wrote: > On Thu, Apr 30, 2009 at 2:55 PM, Andrew Timberlake > wrote: >> It gives me the same error when I run >> rake spec >> spec specs/ >> or >> autospec >> >> It also gives the same error wi

Re: [rspec-users] Help with some basics

2009-05-01 Thread Andrew Timberlake
form of: it "" { ... } In my specific case, my model was in a different schema and so ActiveRecord couldn't find the table in the database. Andrew Timberlake http://ramblingsonrails.com http://www.linkedin.com/in/andrewtimberlake "I have never let my schooling interfere w

Re: [rspec-users] How to spec two lines in application_controller.rb

2009-05-26 Thread Andrew Timberlake
ed with testing my applications and the behaviour I want out of them. As an aside, if you're concerned about code coverage, both lines should execute with every controller test as they must execute while creating the ApplicationController class. Regards Andrew Timberlake http://ramb

Re: [rspec-users] noob question (trying to understand view specs vs webrat and cucumber)...

2009-07-15 Thread Andrew Timberlake
that their are no view specs. I don't use view specs 95% of the time because Cucumber covers this (previously my view specs where just an assertion that the view was there). When theirs something very specific I need to ensure is in the view, I might add a view spec. Andrew Timberlake http://r