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
Yes, so it's useless trying to stub it.
Tools like Remarkable will let you spec that validates call in a
better way -> http://github.com/carlosbrando/remarkable/
-
Maurício Linhares
http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr
On Thu, Aug 20, 2009 at 6:07 PM, B
When you spec runs (and your stub! is called) the method has already
been called, so your stub will never catch anything.
-
Maurício Linhares
http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr
On Thu, Aug 20, 2009 at 5:03 PM, BallaBall wrote:
> I have some model with
Same for me.
-
Maurício Linhares
http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr
On Fri, Jun 12, 2009 at 10:59 AM, Bart Zonneveld wrote:
>
> On 12 jun 2009, at 13:42, Alexandre Da Silva wrote:
>
>> Jarmo Pertman wrote:
>>>
>>> Do you have
we would do with Cucumber
Scenario: Searching for Hello World
Given I go to "http://www.google.com";
When I fill "q" textbox with "Hello World"
When I click "btnG" button
Then I see "Hello World - Google Search" title
With cucumber we n
No, you're not ;P
Hope it's really launched in April \o/
-
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
On Thu, Jan 29, 2009 at 12:10 PM, Juanma Cervera wrote:
> I have just gone to "Pragmatic Programmers" and spent m
"eql?" matches object references, you should use "==" to match equality.
-
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
On Thu, Jan 8, 2009 at 1:26 PM, Leandro Pedroni wrote:
> rspec 1.1.11 and it's rails sidekick.
&
This is a very bad idea, as you can break the whole runtime by doing
this, as many internal classes use floating point math. You would also
slow the world down, as operations using BigDecimals are some order of
magnitude slower than pure floating point math.
-
Maurício Linhares
http
Also, the name isn't Dispatcher anymore, it's ActionController::Dispatcher.
-
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
On Tue, Dec 23, 2008 at 7:26 PM, Mischa Fierer wrote:
> from
> /opt/local/lib/ruby/gems/1.8/gems/cuc
ct (with a vendored rails 2.2.2) it just doesn't
work. And only in testing, the application itself runs completely
fine.
-
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
___
rspec-users mailing list
rspec-use
I had a problem just like this with "has_many_polymorphs" and it was a
bad require ( it was requiring "dispatcher" when it should be
requiring "action_controller/dispatcher")
Maybe a "require 'action_controller/dispatcher'"
the same gems installed in the
app as plugins. My machine is a "Linux linux-fof0
2.6.25.18-0.2-default #1 SMP 2008-10-21 16:30:26 +0200 x86_64 x86_64
x86_64 GNU/Linux
"
-
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
_
;t this making your controller code ugly? Do you have any
samples of this to exemplify what you're doing?
-
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
João Pessoa, PB, +55 83 8867-7208
On Wed, Nov 5, 2008 at 12:44 PM, David Chelimsky <[EMA
ssible to do?
>
> I thought that controller.set_instance_variable( :@user, ... ) would do the
> trick but it does not seem to work.
>
> Thank you!
> --
> View this message in context:
> http://www.nabble.com/Setting-instance-variables-for-controllers-tp19283500p19283500.
tmlformatter by adding these lines into
> example_failed method prior invoking super:
>
> def example_failed example, counter, failure
>
> #
> #some other stuff
> #
>
>if example.description == "before(:all)"
> @example_number +=
> @options.example
culprit. It should be stub!(find... instead of stub(!find
>
> Regards,
> Craig
--
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
João Pessoa, PB, +55 83 8867-7208
___
rspec-users mailing list
;
> 1)
> Spec::Mocks::MockExpectationError in 'IssuesController when saving
> wrong data should not save the issue'
> Mock 'Issue_1001' expected :save with (any args) once, but received it 0 times
> spec/controllers/issues_controler_spec.rb:51:
> spec/
rors-in-controller-test-tp18358354p18358354.html
> Sent from the rspec-users mailing list archive at Nabble.com.
>
> ___
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
--
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
João Pessoa, PB, +55 83 8867-7208
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
:action=>"prices"}
> ./spec/controllers/books_controller_spec.rb:5:
>
> I've tried many different alternatives for get, but they always end up with
> the same error. I'm surely missing something. Any help would be
> appreciated.
>
> Thanks
>
&g
rcov 0.8.1.2.0, rails 2.1 and Ubuntu Linux 8.4.
--
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
João Pessoa, PB, +55 83 8867-7208
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/m
t; I'm pretty sure you can do
> response.body.should be_blank # or == ""
>
> If you don't like how it reads, you could create a custom
> render_nothing matcher.
>
> Pat
--
Maurício Linhares
http://alinhavado.
Hello guys,
Is there any way to match a render :nothing?
I coudn't find any way to do this so i've just changed my controllers
to do a "head :ok", but it would be nice to know if there is any other
way :)
--
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http:
line that contains "should"), but other times, the order
> is the opposite.
> In the third spec above, the sentence that has "should" comes first and
> do_get later. In my view, "get :index" needs to be done first to trigg
create(:username => "mike")
> @another.save.should be_false
>
> This messes up test database. Is there any better way?
>
> -T
> _______
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman
nd also that specs that access
databases run slower than "pure" unit tests, but you can't be sure
that your app works without a bunch of integration tests.
--
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) |
http://codeshooter.wordpress.com/ (en)
João Pessoa, PB, +55
to( :action => 'show', :id =>
@static_page.permalink )
end
--
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) |
http://codeshooter.wordpress.com/ (en)
João Pessoa, PB, +55 83 8867-7208
On Fri, Feb 22, 2008 at 11:25 AM, David Chelimsky <[EMAIL PROTECTED]> wro
lugins/rspec/lib/spec/runner/example_group_runner.rb:21:in
`run'
/home/mauricio/workspace/antares/vendor/plugins/rspec/lib/spec/runner/options.rb:90:in
`run_examples'
/home/mauricio/workspace/antares/vendor/plugins/rspec/lib/spec/runner/command_line.rb:19:in
`run'
script/spec:4:
On Fri, Feb
elete requests are allowed.
./spec/controllers/static_pages_controller_spec.rb:118:
script/spec:4:
So, the response is a redirect (the "response.should be_redirect"
passes) but when i try to be sure that it redirected to the right page
it throws this weird error to me. Any ideas about what I've done
28 matches
Mail list logo