Hi guys,
Is there a way to define a default parameter for all requests made in a spec?
I have a spec where I want all requests to be made with the js
format but I find it rather annoying to type a :format = 'js' on
every get/post/put/delete. Is there any other way to do this?
-
Maurício
Hello,
I am a complete newbie to both ruby and rspec. I am following the
steps in the railstutorial.org book to learn ruby on rails. The
current step involves setting up rspec for the tests, and this is
where I am stuck. Here's what I am doing:
$ cat spec/controllers/pages_controller_spec.rb
Hello,
I'm new in using RSpec and I can't figured out to spec this controller
action.
class OrdersController ApplicationController
before_filter :authenticate_user!
def index
respond_with(@orders = current_user.orders)
end
end
When I want to spec this @assets = Asset.all I use
On Aug 26, 2010, at 8:12 AM, Maurício Linhares wrote:
Hi guys,
Is there a way to define a default parameter for all requests made in a spec?
I have a spec where I want all requests to be made with the js
format but I find it rather annoying to type a :format = 'js' on
every
*smacks head* Duh.
Thanks David and Rob!
On Aug 26, 12:35 am, Rob Biedenharn r...@agileconsultingllc.com
wrote:
On Aug 26, 2010, at 12:14 AM, David Chelimsky wrote:
On Aug 25, 2010, at 10:13 PM, Brian Ploetz wrote:
Environment
--
ruby 1.9.2p0 (2010-08-18 revision
On Aug 22, 2010, at 2:10 PM, Daniel Lidström wrote:
Hello,
I am a complete newbie to both ruby and rspec. I am following the
steps in the railstutorial.org book to learn ruby on rails. The
current step involves setting up rspec for the tests, and this is
where I am stuck. Here's what I am
I updated to rc2 and RSpec beta.20 but still get an error:
Failure/Error: { :get = http://foo.example.com/account/new;
}.should_not be_routable
expected {:get=http://foo.example.com/account/new} not to be
routable, but it routes to {:controller=accounts, :action=new}
Is this a bug? Any
On Aug 26, 2010, at 8:22 AM, Cameron Caine wrote:
I updated to rc2 and RSpec beta.20 but still get an error:
Failure/Error: { :get = http://foo.example.com/account/new;
}.should_not be_routable
expected {:get=http://foo.example.com/account/new} not to be
routable, but it routes to
On Aug 24, 2010, at 6:51 PM, Titinux wrote:
Hello,
I'm new in using RSpec and I can't figured out to spec this controller
action.
class OrdersController ApplicationController
before_filter :authenticate_user!
def index
respond_with(@orders = current_user.orders)
end
end
Would not having run rails generate rspec:install cause this problem?
On 26 Aug 2010, at 14:21, David Chelimsky wrote:
On Aug 22, 2010, at 2:10 PM, Daniel Lidström wrote:
snip /
So it seems spec_helper is not being found, am I right? A search of my
system (Ubuntu 10.04) shows this file in
David Chelimsky dchelim...@gmail.com wrote:
On Aug 24, 2010, at 6:51 PM, Titinux wrote:
Hello,
I'm new in using RSpec and I can't figured out to spec this controller
action.
class OrdersController ApplicationController
before_filter :authenticate_user!
def index
On 26 Aug, 15:25, Brennon Bortz bren...@brennonbortz.com wrote:
Would not having run rails generate rspec:install cause this problem?
On 26 Aug 2010, at 14:21, David Chelimsky wrote:
On Aug 22, 2010, at 2:10 PM, Daniel Lidström wrote:
snip /
So it seems spec_helper is not being found,
Hi guys:
I'm trying to get my RVM/Rails 2 and 3 mixed environment set up, and
I'm still running into problems. Not sure if that's related to rspec
not being found, but here's what's happening:
$ rake spec --trace
(in /Users/dwayne/Sites/casehandler_rails)
** Invoke spec (first_time)
** Invoke
On Aug 26, 2010, at 8:35 AM, dwayne wrote:
Hi guys:
I'm trying to get my RVM/Rails 2 and 3 mixed environment set up, and
I'm still running into problems. Not sure if that's related to rspec
not being found, but here's what's happening:
$ rake spec --trace
(in
in real world, when user deposit money into their bank, bank have money
and can check deposit record. so what would it be in rspec?
it 'should be deposit $10'
user.bank.deposit(10)
user.bank.deposit.saving.should == 10
end
about test , should be deposit $10 is clear? maybe 'should deposit
15 matches
Mail list logo