some interesting viewpoints so far. How do people feel about something like
this:
Given every type of user
When they visit account/manage
Then only Admins and Managers should get access
Given("every type of user") do
@users = {
:admin => new_admin,
:manager => new_manager,
:super
On Jan 23, 2008 12:12 AM, Will Sargent <[EMAIL PROTECTED]> wrote:
> Basically the Jay Fields style of testing -- I want the unit tests to
> be run all the time on a continuous integration server, but the
> integration/functional and system tests to be run only once a night.
I would suggest letting
On Jan 22, 2008 10:26 PM, David Chelimsky <[EMAIL PROTECTED]> wrote:
> On Jan 23, 2008 12:04 AM, Scott Taylor <[EMAIL PROTECTED]> wrote:
> >
> > On Jan 23, 2008, at 12:02 AM, David Chelimsky wrote:
> >
> > > On Jan 22, 2008 10:49 PM, Jonathan Linowes
> > > <[EMAIL PROTECTED]> wrote:
> > >> Hi
> > >
> With 1.1.1 you can do this:
>
> Given "$n_users in the system" do |num_users|
> case num_users
> when "a user"
># one user case
> when /(\d*) users/
># multi user case using $1
> end
> end
>
> With 1.1.2 you can do this:
>
> Given /(a|\d*) users? in the system/ do |num_users|
> num_u
Hi there,
I have a *really* weird issue with rspec on rails:
Given a time meridian formatted using %p
When I run `rake spec` the time meridian is converted to lower case:
expected: "Today 08:00 PM",
got: "Today 08:00 pm"
Yet when I run `rake spec:models` and `spec -cfs app/models` the sp
On Jan 24, 2008 2:25 AM, Neil M. Young <[EMAIL PROTECTED]> wrote:
>
> some interesting viewpoints so far. How do people feel about something like
> this:
>
> Given every type of user
> When they visit account/manage
> Then only Admins and Managers should get access
>
> Given("every type of user") d
On Jan 24, 2008 3:47 AM, Kamal Fariz <[EMAIL PROTECTED]> wrote:
> > With 1.1.1 you can do this:
> >
> > Given "$n_users in the system" do |num_users|
> > case num_users
> > when "a user"
> ># one user case
> > when /(\d*) users/
> ># multi user case using $1
> > end
> > end
> >
> > With
On Jan 24, 2008 5:40 AM, Keith McDonnell <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I have a *really* weird issue with rspec on rails:
>
> Given a time meridian formatted using %p
>
> When I run `rake spec` the time meridian is converted to lower case:
>
> expected: "Today 08:00 PM",
> got: "
Hello all,
I need to specify that a class should define a constant.
I couldn't find something such as "should define_const('MY_CONST')" in
the RSpec documentation, even though there are similar matchers such
as "should respond_to".
I know I can write the matcher myself (that wouldn't be so d
On Jan 24, 2008 8:56 AM, Nicolas Jacobeus <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I need to specify that a class should define a constant.
>
> I couldn't find something such as "should define_const('MY_CONST')" in
> the RSpec documentation, even though there are similar matchers such
> as "shou
On Jan 24, 2008, at 4:36 AM, Pat Maddox wrote:
>
> On Jan 22, 2008 10:26 PM, David Chelimsky <[EMAIL PROTECTED]>
> wrote:
>> On Jan 23, 2008 12:04 AM, Scott Taylor
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> On Jan 23, 2008, at 12:02 AM, David Chelimsky wrote:
>>>
On Jan 22, 2008 10:49 PM, Jona
I actually really like this idea. Very neat. Like David said the only
problem might be being able to see where the failure occurred. I think
that this problem could be solved or at least mitigated with some sort
of custom matcher though (maybe even a simple one.)
This solves the baseline cas
Hi guys,
I am a Rspec newbie and am having problems creating a spec for a RoR helper
method.
I have in fact already implemented the helper method and am trying to create
retrospective specs. I know its the wrong way to do it but I am still
learning Rspec.
In my view I have a call to a helper met
Hi,
Here's the spec:
'absolute_time_in_words should say 'Today 08:00 PM'' FAILED
expected: "Today 08:00 PM",
got: "Today 08:00 pm" (using ==)
absolute_time_in_words(Time.now.utc.change({
:hour => 20,
:minute => 0,
:second => 0
}), TZInfo::Timezone.get('Europe/Dubl
I see that rails handles exceptions in stories by rendering public/500.html,
whereas in controller specs exceptions are re-raised. Is it possible to have
this same behaviour in stories so I can check the correct exceptions are
being raised?
--
View this message in context:
http://www.nabble.com/
Neil M. Young wrote:
> I see that rails handles exceptions in stories by rendering public/500.html,
> whereas in controller specs exceptions are re-raised. Is it possible to have
> this same behaviour in stories so I can check the correct exceptions are
> being raised?
>
I do this by putting the
No, the mock is set up to return nil when user= is called. Then he
writes an example to actually expect the call to user=.
Pat
On Jan 23, 2008 8:02 AM, Corey Haines <[EMAIL PROTECTED]> wrote:
> I get the unexpected message :user= failure.
>
> When you set up the mock with the initial parameters,
17 matches
Mail list logo