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 $10
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 /Users/dwayne/Sites/
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 db:
On 26 Aug, 15:25, Brennon Bortz 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:
>
> >>
> >> So it seems spec_helper is not being found, am I right? A sea
David Chelimsky 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
>>respond_wi
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:
>
>>
>> So it seems spec_helper is not being found, am I right? A search of my
>> system (Ubuntu 10.04) shows this file
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)
> en
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 r
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
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
*smacks head* Duh.
Thanks David and Rob!
On Aug 26, 12:35 am, Rob Biedenharn
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 29036) [x86_64-d
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 ge
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 "As
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
req
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 Lin
15 matches
Mail list logo