On Oct 27, 2010, at 2:49 PM, Joseph DelCioppio wrote:
> Hello all,
>
> I'm trying to perform a pretty simple routing constraint
>
> Here are my routes, my constraint, and my spec. http://gist.github.com/649430
>
> As you can see, I've attempted to stub my RootConstraints.matches?
> method to ju
On Oct 28, 2010, at 3:25 PM, Mack T. wrote:
> Figured this out. Our fixtures outside Rspec are actually being used to
> create instances of ActiveRecord models. AR supports
> accepts_nested_attributes_for, but the Rspec fixtures bypass AR and
> simply attempt to set database values.
There are n
Figured this out. Our fixtures outside Rspec are actually being used to
create instances of ActiveRecord models. AR supports
accepts_nested_attributes_for, but the Rspec fixtures bypass AR and
simply attempt to set database values.
--
Posted via http://www.ruby-forum.com/.
_
On Oct 27, 2010, at 12:40 PM, Eugen Ciur wrote:
> Hi,
>
> I am testing a model A, which calls inside url_for method; rspec
> complains that url_for is undefined
Sometimes error messages tell you exactly what you need to know. In this case,
url_is not defined in ActiveRecord models. This is true
On Wed, Oct 27, 2010 at 6:30 PM, Mack T. wrote:
> I appreciate the quick response! Sorry for the delay. The relevant
> code is attached. Our model's name is Scale, which has_many
> ScaleElements.
>
> We're loading fixtures in specs with config.fixture_path =
> "#{::Rails.root}/spec/fixtures"
>
Hello all,
I'm trying to perform a pretty simple routing constraint
Here are my routes, my constraint, and my spec. http://gist.github.com/649430
As you can see, I've attempted to stub my RootConstraints.matches?
method to just return true or false. However, this doesn't seem to
work correctly.
I have made 2 examples for this and I can't figure out how to make both
pass. Take a look please:
require 'spec_helper'
describe "Mock" do
class A
def self.method_missing(name, *args, &block)
'*a_method_missing*'
end
def self.present_method(arg)
'*present_method*'
e
I have the same problem with the combination above with Ruby 1.9.2 on
Windows XP, as described here:
http://www.ruby-forum.com/topic/205569
Calling Rspec directly produces colored output, but autotest spits out
ANSI sequences. The issue was supposed to be closed with win32console
1.3.0, but obviou
Hi!
I am trying to upgrade rspec-rails to 1.3.3, and one of my specs fails.
In before :each I stub finder method like this:
Payment.stub!(:find_by_id).with(@payment.id.to_s).and_return @payment
Payment class is derived from AR::Base
And then in one of the examples I call Payment.find_by_id((@pay