On Wednesday 01 September 2010, David Chelimsky wrote:
> On Sep 1, 2010, at 7:49 AM, Michael Schuerig wrote:
> > I'm in the process of updating an app for Rails 3.0 and rspec-rails
> > 2.0.0.beta20. When I'm running my specs (rake spec) I get a large
> > number of
define has_selector? (or
have_selector? as webrat does).
Presumably, this is all just a dependency problem, but I have no clear
idea where to look.
Michael
--
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/
___
rspec-users
spec
def content_for(name)
view.instance_variable_get(:@_content_for)[name]
end
and then
content_for(:sidebar).should ...
Michael
--
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/
___
rspec-users mailing list
r
On Monday 05 July 2010, David Chelimsky wrote:
> On Jul 3, 2010, at 4:40 PM, Michael Schuerig wrote:
> > On Saturday 03 July 2010, David Chelimsky wrote:
> >> On Jul 3, 2010, at 3:34 PM, Michael Schuerig wrote:
> > [double loading of Rails framework classes]
> &g
On Saturday 03 July 2010, David Chelimsky wrote:
> On Jul 3, 2010, at 3:34 PM, Michael Schuerig wrote:
[double loading of Rails framework classes]
> > require File.dirname(__FILE__) + "/../config/environment" unless
> > defined?(Rails)
>
> This is from an old vers
point? Apparently it is not and I have no idea why.
rspec spec/some_spec.rb is slightly different. Here
ActionController::Base is loaded just once, but the engine callback is
not executed.
rspec and associated gems are 2.0.0.beta.15
rails is 3.0.0.beta4
I'm stumped.
Michael
--
Michael Sc
On Tuesday 22 June 2010, David Chelimsky wrote:
> On Jun 22, 2010, at 10:06 AM, David Chelimsky wrote:
> > On Jun 22, 2010, at 9:58 AM, Michael Schuerig wrote:
> >>> Stubs and assigns are unrelated, so even though this might be a
> >>> bug, I don't thin
On Tuesday 22 June 2010, David Chelimsky wrote:
> On Jun 22, 2010, at 8:27 AM, Michael Schuerig wrote:
> > #_view (and #view in turn) creates just one ActionView::Base
> > instance the first time it is called. That's as it is intended.
> > The effect is, however, th
On Sunday 20 June 2010, Michael Schuerig wrote:
> Are partial mocks supposed to work in rails-rspec 2.0.0.beta.12?
>
> I'm trying to do things like
>
> view.stub(:current_user).and_return(@user)
> view.stub(:current_page?).and_return(false)
>
> However, when
On Monday 21 June 2010, David Chelimsky wrote:
> On Jun 20, 2010, at 5:18 PM, Michael Schuerig wrote:
> > # in spec/spec_helpers.rb
> >
> > config.include PartialHelpers, :example_group => {
> >
> >:description => lambda { |description|
> >
On Sunday 20 June 2010, David Chelimsky wrote:
> On Jun 20, 2010, at 3:19 PM, Michael Schuerig wrote:
> > Are partial mocks supposed to work in rails-rspec 2.0.0.beta.12?
> >
> > I'm trying to do things like
> >
> > view.stub(:current_user).and_retu
th Rails 3 and RSpec 2 and so I'm stumbling around
alot in the sources and inch along in the debugger. One repeating point
of bother is that often stacktraces are barely informative when
delegation and dynamically generated code are in there. Unfortunately, I
can't think of a way to improv
On Sunday 20 June 2010, David Chelimsky wrote:
> On Jun 20, 2010, at 9:35 AM, Michael Schuerig wrote:
> > I already found out, that I
> > can set expectations with view.should_receive(:render) like I did
> > in pre-2.0 with template.should_receive(:render).
>
> That do
On Sunday 20 June 2010, David Chelimsky wrote:
> On Jun 20, 2010, at 8:03 AM, David Chelimsky wrote:
> > On Jun 20, 2010, at 7:30 AM, Michael Schuerig wrote:
> >> On http://github.com/rspec/rspec-rails under "View specs" there's
> >> an example
>
On Sunday 20 June 2010, David Chelimsky wrote:
> On Jun 20, 2010, at 7:30 AM, Michael Schuerig wrote:
> > On http://github.com/rspec/rspec-rails under "View specs" there's
> > an example
> >
> > describe "events/index.html.erb" do
>
undefined method `render_template' for
#
Michael
--
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Sunday 20 June 2010, David Chelimsky wrote:
> On Jun 19, 2010, at 4:19 PM, Michael Schuerig wrote:
> > If not, what do I have to do to make the specs aware of helpers?
>
> helper(MyHelper, :my_helper, 'other_helper')
I see. Thanks, that works.
Michael
--
Mic
12 with Rails 3.0.0.beta4.
Michael
--
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
ding titles and
abstracts are within the same LI. I understand why it doesn't work, for
with_scope just builds up a scope chain. Unfortunately, I don't see how
to get the check I want.
Michael
--
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/
On Sunday 19 April 2009, Michael Schuerig wrote:
> In a Rails controller I set the scope on a model class in an around
> filter. I have defined expectations on the model classes, and
> ideally, I would add a further expectation for the scope. Is this
> already possible in some way? Ho
On Thursday 21 May 2009, David Chelimsky wrote:
> On Thu, May 21, 2009 at 4:26 AM, Michael Schuerig
wrote:
> > I'm trying to run the specs of the rspec-rails master branch, but
> > both plain rake as well as rake spec fail.
>
> Right now the only way to run them is i
hings sees to it that Rails is properly required.
Any hints on how to get the specs to work?
Michael
--
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
nd "response.code"
Then /^I should find "([^\"]*)"$/ do |the_string|
json = ActiveSupport::JSON.decode(@response.body)
obj = traverse(json, the_string)
assert_not_nil obj
end
def traverse(json, path)
path.split('.').inject(json) do |value, selector|
value = value[selector]
end
rescue
nil
end
Michael
--
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
te is mapped onto the real
# firstname and lastname attributes.
allow :name
condition :name =>
"LOWER(firstname || ' ' || lastname) :op LOWER(?)"
order :name => "lastname :dir, firstname :dir"
end
Michael.
--
Michael Schuerig
mail
ope(*args, &block) &&
(!...@scope_expectation || @scope_expectation.scope_matches?)
end
end
end
end
Spec::Mocks::MessageExpectation.class_eval do
include Spec::Mocks::MessageExpectationScopeExtension
end
--
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/
_
On Monday 20 April 2009, Zach Dennis wrote:
> On Sun, Apr 19, 2009 at 6:41 PM, Michael Schuerig
wrote:
[big snip]
> I think I am starting to understand what you're after. You want to
> ensure the scope defined in your query_scope configuration block in
> the controller is used
nt
render
end
end
end
...
# app/views/people/index.json.rb
{
:identifier => Person.primary_key,
:totalCount => @count,
:items => @people.map { |p|
render :partial => 'people/item', :locals => { :person => p }
}
}
# app/views/people/_i
t's an entirely different
spec at a lower level ob abstraction.
Michael
--
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Monday 20 April 2009, David Chelimsky wrote:
> On Sun, Apr 19, 2009 at 5:41 PM, Michael Schuerig
wrote:
> > On Sunday 19 April 2009, Zach Dennis wrote:
> >> On Sun, Apr 19, 2009 at 2:09 PM, Michael Schuerig
> >
> > wrote:
> >> > On Sunday 19 April 20
On Sunday 19 April 2009, Zach Dennis wrote:
> On Sun, Apr 19, 2009 at 2:09 PM, Michael Schuerig
wrote:
> > On Sunday 19 April 2009, Zach Dennis wrote:
> >> On Sun, Apr 19, 2009 at 12:27 PM, Michael Schuerig
> >
> > wrote:
> >> > In a Rails control
On Sunday 19 April 2009, Zach Dennis wrote:
> On Sun, Apr 19, 2009 at 12:27 PM, Michael Schuerig
wrote:
> > In a Rails controller I set the scope on a model class in an around
> > filter. I have defined expectations on the model classes, and
> > ideally, I would add a furthe
--
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Tuesday 07 April 2009, Phlip wrote:
> Michael Schuerig wrote:
> > def failure_message
> > "expected\...@raw_target}\n" +
> > "to be JSON code equivalent to\...@raw_expected}\n" +
> > "Difference:\...@expected.d
+
"to be JSON code different from\...@raw_expected}"
end
private
def decode(s, which)
ActiveSupport::JSON.decode(s)
rescue ActiveSupport::JSON::ParseError
raise ArgumentError, "Invalid #{which} JSON string:
#{s.inspect}"
end
end
d and
ActiveSupport.
It would be very helpful to have an existing plugin that's tested like
this as a guideline. Any suggestions?
Thanks,
Michael
--
Michael Schuerig
mailto:[EMAIL PROTECTED]
http://www.schuerig.de/michael/
___
rspec-users mailing list
r
I admit it, when it comes to rSpec, I'm lazy. I've made a few feeble
attempts to use it, but for once I'm waiting for a book-length
treatment. At least two books were announced, I think. Can anyone in
the know please report on their progress?
Thanks
Michael
--
Michael Schueri
36 matches
Mail list logo