[rspec-users] Expectation test: error says it's different, but it's printed the same way

2009-09-16 Thread Ramon Tayag
b:42: ## the method in Order def self.process_aftersale self.paid.updated_on(1.week.ago).each do |o| MailingsWorker.asynch_deliver_order_aftersale_to_inquire(:order_id => o.id) end end == I may be doing things wrong, so please let me k

[rspec-users] Gem tutorials / setting up rspec in a gem

2010-03-30 Thread Ramon Tayag
e gems framework agnostic but for brevity's sake (and for my own sanity) I'm willing to make it very plugin-like for now. I've been reading and researching for 3 days you see :) Thanks, and I apologize for the novel! Ramon Tayag ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Gem tutorials / setting up rspec in a gem

2010-03-30 Thread Ramon Tayag
Oh and yes, I'm using jeweler. :) Ramon Tayag On Tue, Mar 30, 2010 at 7:09 PM, aslak hellesoy wrote: > > > On Tue, Mar 30, 2010 at 12:17 PM, Ramon Tayag wrote: > >> Hey everyone! >> >> A few days ago, I tried my hand at creating a gem. I've been putting

Re: [rspec-users] Gem tutorials / setting up rspec in a gem

2010-03-30 Thread Ramon Tayag
ions. The name "acts_as_subscribable" should be descriptive enough :) Ramon Tayag On Tue, Mar 30, 2010 at 7:09 PM, aslak hellesoy wrote: > > > On Tue, Mar 30, 2010 at 12:17 PM, Ramon Tayag wrote: > >> Hey everyone! >> >> A few days ago, I tried my hand at creati

Re: [rspec-users] Gem tutorials / setting up rspec in a gem

2010-03-30 Thread Ramon Tayag
ome models. > > In my case, I created a models folder in my gem and put my usual model > files in there. Then I require all of them in a Dir[].each block in my > soec_helper.rb. > With FactoryGirl, you don't even need to require them first, but in > your case you probably nee

Re: [rspec-users] rspec1.3.2/rspec-rails1.3.4 and Rake 0.9.1 = lots of deprecation warnings

2011-06-04 Thread Ramon Tayag
Sounds like it doesn't know how to load rake. Try require 'rake' or something like that on top. Ramon Tayag On Jun 4, 2011, at 22:58, MattR wrote: Hi folks, I've been searching google and I don't think this case has yet been identified. I've got an older, Rails 2

Re: [rspec-users] including a module with ActiveSupport::Concern works in console/site, but not in specs

2011-06-04 Thread Ramon Tayag
Not sure why it works inconsistently, but I always thought you did the following to include class methods via activesupport::concern: class Buyer extend ActiveSupport::Concern included do # def a_class_method end def an_instance_method ... end Ramon Tayag On Jun 4, 2011, at 22:51

[rspec-users] Testing variables in controllers?

2008-11-06 Thread Ramon Tayag
uld == 1" makes sense but it doesn't work. Of course, I might be doing this wrong altogether! Very new to rspec. Thanks! Ramon Tayag ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Testing variables in controllers?

2008-11-06 Thread Ramon Tayag
Cool thanks Fernando, Matt, Nick - it seems like I haven't made my models fat enough. That seems to be the answer :) Ramon Tayag On Fri, Nov 7, 2008 at 12:50 AM, Nick Hoffman <[EMAIL PROTECTED]> wrote: > On 2008-11-06, at 09:36, Ramon Tayag wrote: >> >> How do you

[rspec-users] Hash / params causing errors

2008-11-06 Thread Ramon Tayag
pec::Mocks::MockExpectationError in 'UsersController handling POST /users should create a new user from params' Mock 'Class' expected :new with ({:email=>"[EMAIL PROTECTED]"}) but received it with ({"email"=>"[EMAIL PROTECTED]&qu

Re: [rspec-users] Hash / params causing errors

2008-11-06 Thread Ramon Tayag
do_post end On Fri, Nov 7, 2008 at 11:03 AM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Thu, Nov 6, 2008 at 9:53 PM, Ramon Tayag <[EMAIL PROTECTED]> wrote: >> Hey everyone, >> >> I'm trying to spec a controller and I can't seem to get a te

Re: [rspec-users] Hash / params causing errors

2008-11-06 Thread Ramon Tayag
A bit dryer: ... @params = { "login" => "loginator", "email" => "[EMAIL PROTECTED]" } ... User.should_receive(:new).with(@params).and_return(@user) ... Ramon Tayag ___ rspec-users mailing list rspec-us

[rspec-users] Autotest style autotest/rails_rspec doesn't seem to exist. Aborting.

2008-11-13 Thread Ramon Tayag
Just upgraded my rspec because I wanted to start using cucumber. Autotest stopped working though. I got the error shown in the subject: "Autotest style autotest/rails_rspec doesn't seem to exist. Aborting." What should I do? ZenTest

[rspec-users] Autotest style autotest/rails_rspec doesn't seem to exist. Aborting.

2008-11-13 Thread Ramon Tayag
I do to fix it? ZenTest: 3.11.0 rspec: 1.1.11 Thanks, Ramon Tayag ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] testing an action which requires picture

2008-11-13 Thread Ramon Tayag
n valid attributes" do ProductImage.create!(@valid_attributes) end end Ramon Tayag On Thu, Nov 13, 2008 at 7:37 PM, Mano ah <[EMAIL PROTECTED]> wrote: > Ramon Tayag wrote: >> You can put that barcode in the spec/fixtures directory. However, >> you'll need to manually

Re: [rspec-users] testing an action which requires picture

2008-11-13 Thread Ramon Tayag
You can put that barcode in the spec/fixtures directory. However, you'll need to manually place it there. Ramon Tayag On Thu, Nov 13, 2008 at 7:18 PM, Mano ah <[EMAIL PROTECTED]> wrote: > Actually i need to test sending a barcode image and also test a value > returned by it.

Re: [rspec-users] testing an action which requires picture

2008-11-13 Thread Ramon Tayag
Hmm.. not sure what that error is. The veterans in here might be able to help you. The create action should work... btw, this is a model spec, not a controller spec, just in case you're a newbie. Ramon Tayag On Thu, Nov 13, 2008 at 8:48 PM, Mano ah <[EMAIL PROTECTED]> wrote: > C

Re: [rspec-users] Autotest style autotest/rails_rspec doesn't seem to exist. Aborting.

2008-11-13 Thread Ramon Tayag
Yup, I submoduled them :) I suppose that's just like an external svn repo. I'll try reinstalling them... but in the mean time, got any ideas? Ramon Tayag On Thu, Nov 13, 2008 at 9:44 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > You need rspec-rails as well (plugin or g

Re: [rspec-users] Autotest style autotest/rails_rspec doesn't seem to exist. Aborting.

2008-11-18 Thread Ramon Tayag
Thanks for you replies. I reinstalled it and it works fine. It seems that it didn't install properly before! :o thanks goodness that's it. hehe Ramon Tayag On Mon, Nov 17, 2008 at 8:19 AM, David Chelimsky <[EMAIL PROTECTED]> wrote: > Is this only happening in one rails

[rspec-users] Testing on enter state

2008-11-19 Thread Ramon Tayag
this? Thanks, Ramon Tayag ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Testing on enter state

2008-11-19 Thread Ramon Tayag
Not sure if I'm understanding right, but no, I can make the method public -- I just got used to methods, that aren't (or don't need to be) called by anything but its owner, being private. If I make it public it solves my question somewhat :) Thanks, Ramon Tayag On Wed, Nov 19,

Re: [rspec-users] Testing on enter state

2008-11-19 Thread Ramon Tayag
Ahh.. yes, you do. Thanks a lot! That definitely answers my question. Ramon Tayag On Wed, Nov 19, 2008 at 10:01 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > I didn't mean make the methods public. I meant use the public API. > > For example, this: > > describe Dog

[rspec-users] restful_authentication's "permission_denied" and rspec

2008-11-21 Thread Ramon Tayag
e else. I want to test that this occurs given certain conditions but I don't know how to "should_receive" this or something. This definitely doesn't work but it should explain what I'm trying to do: controller.should_receive(:permission_denied) How would