Hello all.
I'm working with rails and came to a situation that i cannot imagine
how to test this.
Given i have an index action that retrieves me a collection of
objects.
But some of them have especific permissions.
My index action act like this:
- retrieve public objects.
- retrieve permission
I'm in the process of upgrading my rails app to rails 3 and I'm
getting different results from running the 2 commands above. The
bundle exec rspec runs my tests correctly, but when I run rake
spec it doesn't seem to do anything. I get 0 examples, 0
failures. This is on version 2.0.0.beta.17 of
I have a question of how rspec treat eventmachined rails app.
My understanding is eventmachined is normally run within Thin, and it
is Thin who initiates the event loop.
So how do you test the eventmachined rails app? Do we have to modify
the rspec script to initiate the event loop?
Thanks.
Hi.
My issue is similar to the one in this post:
http://groups.google.com/group/rspec/browse_thread/thread/973d770e45bdd6cd/8ba067476003f08f?lnk=gstq=render+controller+should_receive#8ba067476003f08f
(which, btw, I could not reply to...only option was Reply to Author)
where I have a RESTful
On Jul 19, 2010, at 7:51 AM, Jay wrote:
I'm in the process of upgrading my rails app to rails 3 and I'm
getting different results from running the 2 commands above. The
bundle exec rspec runs my tests correctly, but when I run rake
spec it doesn't seem to do anything. I get 0 examples, 0
On Jul 12, 2010, at 4:18 AM, Ruprict wrote:
Hi.
My issue is similar to the one in this post:
http://groups.google.com/group/rspec/browse_thread/thread/973d770e45bdd6cd/8ba067476003f08f?lnk=gstq=render+controller+should_receive#8ba067476003f08f
(which, btw, I could not reply to...only
I don't if this is a bug or feature but if before(:all) create some
persistent objects, these changes doesn't rollback when we get out of the
context.
Here are simplest example to see the issue:
describe Person do
context 1 do
before(:all) do
Person.create!(@valid_attributes)
end
More info here http://rspec.info/documentation/before_and_after.html. Note
the warning at the bottom of the page.
Regards,
Craig
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
Ben Mabey wrote:
I like using jeweler to create the structure of my gems. It is like
Rail's generators but for gems. Try it out:
gem install jeweler
jeweler my_gem --rspec --cucumber
HTH,
Ben
not really - but thanks for offering help :)
I followed the Rspec Book, railscast's on the
Hi all. Noticed that with rspec 1.x
methods at higher levels aren't available in lower, ex:
context a do
def go
end
it should pass do
go
end
it should pass again do
context a::b do
go
end
end
end
This surprised me a bit, making re-use of outer methods unavailable.
Is
On Jul 20, 2010, at 1:07 PM, rogerdpack wrote:
Hi all. Noticed that with rspec 1.x
methods at higher levels aren't available in lower, ex:
context a do
def go
end
it should pass do
go
end
it should pass again do
context a::b do
You can't wrap contexts inside examples.
HI All,
I would like to perform my spec runs without the db:test:prepare rake
prereq.
It would be nice if I could alter spec to prereq db:test:purge only.
Could you give me some advice/urls/pointers on how best to go about this?
Thanks,
Peter Fitzgibbons
(847) 859-9550
Email:
On Jul 20, 2010, at 4:18 PM, Peter Fitzgibbons wrote:
HI All,
I would like to perform my spec runs without the db:test:prepare rake prereq.
It would be nice if I could alter spec to prereq db:test:purge only.
Could you give me some advice/urls/pointers on how best to go about this?
On Jul 19, 9:20 am, Wincent Colaiuta w...@wincent.com wrote:
El 19/07/2010, a las 15:52, David Chelimsky escribió:
On Jul 19, 2010, at 8:17 AM, rogerdpack wrote:
Hi all.
Saw this:
Usage: rspec [options] [files or directories]
-b, --backtrace Enable full
My understanding is eventmachined is normally run within Thin, and it
is Thin who initiates the event loop.
So how do you test the eventmachined rails app? Do we have to modify
the rspec script to initiate the event loop?
You could also use
before(:all) do
EM.start_in_other_thread
end
or
it should pass again do
context a::b do
You can't wrap contexts inside examples.
Cool thanks for the reply.
The confusing part is that it allowed me to have that context within
an example.
Maybe a more explicit failure for newbies when they do this would be
kind.
-r
16 matches
Mail list logo