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
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
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
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
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
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
>
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
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
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
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
10 matches
Mail list logo