> Julius:~ caius$ irb
> >> require "spec"
> => true
> >> include Spec::Matchers
> => Object
> >> %w(1 2 3).should have(3).items
> => true
>
> C
> ---
> Caius Durling
> [EMAIL PROTECTED]
> +44 (0) 7960 268 100
> http://caius.name/
thx, its working.
--
Posted via http://www.ruby-forum.com/.
__
Zach Dennis wrote:
> In #rspec the instructions for installing rspec and rspec-rails on a
> Rails project. Specifically talking about the following line from
> http://github.com/dchelimsky/rspec-rails/wikis/home
>
> config.gem "rspec-rails", :lib => "spec"
>
> I think this should be updated to
Hi,
We would like to pass in some additional command line arguments into
Cucumber (for example to specify which browser to run the tests with).
Is there any way to extend Cucumber's arguments, or could you suggest
an alternative way of going about this?
Aid
__
On Wed, Oct 15, 2008 at 12:26 PM, aidy lewis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> We would like to pass in some additional command line arguments into
> Cucumber (for example to specify which browser to run the tests with).
>
> Is there any way to extend Cucumber's arguments, or could you suggest
>
I have a different question about the article (pity comments are closed).
def mock_account(stubs={})
stubs = {
:save => true,
:update_attributes => true,
:destroy => true,
:to_xml => ''
}.merge(stubs)
@mock_account ||= mock_model(Account, stubs)
end
With thi
Hi Mark
Yeah I was looking at that later on too. And yes if you use in a
'before' it does. Only setting in an 'it' block is ok.
I was using this as a quick test as we are on an older version of
rspec and I was checking if it may have changed but this fails on 1.1.8
require File.expand_p
Hi guys. One of my methods uses a constant in another method, like this:
class A
def something
"foo: #{B::BAR}"
end
end
When writing the spec for A#something , how would you mock or stub
#{B::BAR}, and how would you set an expectation that B::BAR is used?
Thanks,
Nick
___
Probably, I would just check the outcome of the method instead of checking
interaction with a constant.
Craig
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Wed, Oct 15, 2008 at 4:39 PM, Craig Demyanovich
<[EMAIL PROTECTED]> wrote:
> Probably, I would just check the outcome of the method instead of checking
> interaction with a constant.
>
What he said,
--
Zach Dennis
http://www.continuousthinking.com
http://www.mutuallyhuman.com
I'm getting the same error - I'm using Test::Unit with Shoulda for this
particular project, and can't autotest because it is trying to load
autotest/rails_rspec.
David Chelimsky wrote:
> The only reason that I know of that this would be happening would be
> that there are both a spec directory i
On 2008-10-15, at 16:39, Craig Demyanovich wrote:
Probably, I would just check the outcome of the method instead of
checking interaction with a constant.
Craig
So you guys wouldn't worry about the spec for class A being coupled to
this constant in class B?
-Nick
__
On Wed, Oct 15, 2008 at 8:47 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> On 2008-10-15, at 16:39, Craig Demyanovich wrote:
>
>> Probably, I would just check the outcome of the method instead of checking
>> interaction with a constant.
>>
>> Craig
>>
>
> So you guys wouldn't worry about the spec
On Wed, Oct 15, 2008 at 8:24 PM, Jon Dahl <[EMAIL PROTECTED]> wrote:
> I'm getting the same error - I'm using Test::Unit with Shoulda for this
> particular project, and can't autotest because it is trying to load
> autotest/rails_rspec.
>
> David Chelimsky wrote:
>> The only reason that I know of t
On Oct 15, 2008, at 4:31 PM, Nick Hoffman wrote:
Hi guys. One of my methods uses a constant in another method, like
this:
class A
def something
"foo: #{B::BAR}"
end
end
When writing the spec for A#something , how would you mock or stub
#{B::BAR}, and how would you set an expe
I am new to rSpec and I am writing a test for a controller which has
already been developed
This is the example in my reports_controller_spec.rb:
it "should render the layouts/menu template" do
get :select_missing_persons
response.should render_template("layouts/menu")
end
and this is th
Try to write a customized matcher, here is an example
# custom matchers
#-
class UseLayout
def initialize(expected)
@expected = 'layouts/' + expected + '_layout'
end
def matches?(controller)
@actual = controller.layout
[EMAIL PROTECTED](@expected)
16 matches
Mail list logo