Displaying 20 results from an estimated 300 matches similar to: "[0.8.0-RC1] problem with drbspec"
2007 Jan 22
1
Observed models cause failures with DRBSpec ?
Hi all !
I don''t believe I am the only one using model observers, right ?
Well, here''s a nice one:
$ drbspec spec
.
Finished in 0.125322 seconds
1 specification, 0 failures
$ drbspec spec
F
1)
''A user with an inactive and an active project should be able to
return active projects only'' FAILED
[] should == [#<Spec::Mocks::Mock:0xb75590bc
2007 Jan 19
3
problems updating to 0.7.5.1
Hi all
I''ve upgraded the rails plugin from 0.7.5 to 0.7.5.1 (plugin/remove
rspec_on_rails followed by :
ruby script/plugin install
svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_5_1/rspec_on_rails/vendor/plugins/rspec_on_rails
I''ve also updated the rspec gem and removed the older version. I''m running
rubygems 0.9.1 on a windows box
however, when I try to run a spec
2007 Feb 26
15
drbspec - "no server running"
At times I''ve gotten the message "No Server Running" from drbspec
with my rails app. The thing is, the drb server certainly is running!
This happened a few times with my model specs. I''m not sure exactly
what the problem was there - I believe I was loading up fixtures that
didn''t exist. I was calling fixtures :singular_table_name as opposed
to
2007 Feb 28
2
Fixture name not available as class variable in spec
Hi there,
I can''t seem to access the fixture name as a class variable from my
specs. I have to set the variable in the spec setup.
... [fixtures]
my_fixture:
id: 1
... [rpsec]
@my_fixture.id.should == 1
... [error]
You have a nil object when you didn''t expect it!
The error occurred while evaluating nil.id
... [my setup]
RSpec-0.7.5.1 (r1395) - BDD for Ruby
Rails
2008 Jan 31
4
reby-debug and rspec
How do I use the ruby debugger with a specific test (not the whole spec file)? I want to do something like this.
$ rdebug spec/models/user_spec.rb -s "should error if not new_record"
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.
2007 Oct 31
12
autotest displays no output
Hey, I''m trying to configure autotest with rspec on cygwin but something is
going wrong.
I made a very simple testing environment with a user.rb and user_spec.rb
file. Rspec works fine, but autotest outputs nothing - it just stays here,
idle. ^C doesn''t display anything more.
I can see it''s running because I added require ''autotest/snarl'' in my
2007 Jun 21
3
Sqlite3, in-memory db and rspec_server
Hi everyone.
I can''t get the above(subject line) combination to work. If I use a
standard sqlite3 file db for the test db, and spec_server all the
specs on my models pass. If I use an in-memory db for the test db,
script/spec w/o spec_server, they all pass. But if I use in-memory and
spec_server I get the following error:
1)
ActiveRecord::StatementInvalid in ''User should be
2007 Oct 17
16
rspec causing validates_presence_of to validate twice?
I had posted this on the regular Rails list, but upon trying this in
script/console, it seems like the behavior only exists when running rspec.
I''m getting some weird behavior in one of my models. I have a model
defined something like this
class User < ActiveRecord::Base
attr_accessor :password
validates_presence_of :password
end
If I validate the model without specifying a
2007 Aug 12
3
Scope and specing models
Hello all, I''m currently having an issue with some specs, specifically scope
issues (probably more of a scope issue than a spec issue at this point)...
Here''s the error:
ActiveRecord::AssociationTypeMismatch in ''A new User should know what role
it has''
Role expected, got NilClass
D:/ruby/projects/restful_authentication_test/config/../app/models/role.rb:5:in
2007 Mar 06
10
Windows rspec "gem install win32console"
Hi,
Hi I am trying to use RSPEC on windows and i keep getting the following
error
"You must gem install win32console to use colour on Windows"
I have installed this Gem but i am still getting the same error. The
file that error is coming from is:
C:\ruby\lib\ruby\gems\1.8\gems\rspec-0.8.2\lib\spec\runner\formatter\base_text_formatter.rb
Do i need to put this line of code in? Where
2007 Dec 10
2
Duplicate error messages
I am running rails 1.2.3 and rspec 1.0.8 on os X 10.4 and I am having a
problem with one of my model specs (User class). For some reason rspec
is throwing repeating errors. If the error I expect is "email is
required", I end up getting it several times. What''s even more
confusing, my spec passes without DRB, but with DRB is when all the
multiple errors show up. At the moment I
2007 Aug 04
5
reusable specs - almost there
I have a lot of controllers with virtually identical functionality for most
actions. I''ve been using shared behaviours to DRY things up a bit, but I
still have to create separate behaviours for each context before I can use
the shared behaviours
what I have now is a generic file which contains all the behaviours and
examples common to all the controllers, and that file gets loaded from
2009 Jun 13
2
removing Mocha; 'spec spec' fails but the specific model file passes
I happened to mix ryan bates'' authentication scaffold with
rspec_scaffold on a demo project.
and ran into the problem of mixing mock frameworks...ryan uses mocha.
So, as a learning experience, I choose to redo ryan''s tests without
mocha but ran into a strange problem with tests of the User model.
With debugging you can see....
If you run just the user_spec.rb file, everything
2007 Jan 29
2
rspec and cookies
Hello
can anyone tell me how to test cookies using rspec? specifically, I''d like
to be able to set a cookie before a get/post request and also to test the
cookies which have been set by a get/post request
I know I can use cookies[:name] = ''value'' to set a cookie but how would I
set expiry information on such a cookie? when i try to pass a hash {:value
=>
2007 Aug 22
2
stubbing network calls
I have a couple of methods which make networks calls. Where''s the best place
to stub them so they are stubbed for every description automatically? I
tried in spec_helper.rb but they are no longer stubbed when a spec runs.
at the moment, I''m checking for the test environment in the methods
themselves, and returning a dummy value, but I''m sure there''s a better
2010 Aug 11
6
rspec2 not working with shoulda
I am using rails edge. I am using gem "rspec-rails", "= 2.0.0.beta.
19" .
I have following code at spec/models/user_spec.rb
require ''spec_helper''
describe User do
it { should validate_presence_of(:email) }
it { should validate_presence_of(:name) }
end
Here is my gemfile
group :development, :test do
gem ''factory_girl_rails'',
2008 Jun 04
8
Not running correct specs under autotest:
I know this isn''t autotest-users but I''m not sure where else to bring this up:
[["app/controllers/contents_controller.rb", Wed Jun 04 14:11:03 +0100 2008]]
[["app/controllers/contents_controller.rb", Wed Jun 04 14:11:03 +0100 2008]]
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S
script/spec -O spec/spec.opts spec/models/user_spec.rb
2007 May 26
11
RSpec
Hi RSpec Mailing list,
I''m new to RSpec and I am trying to get it running with the caboo.se sample
rails app.
I installed the current version of rspec with rspec_on_rails
I tried to run rake spec but received:
330-07:~/desktop/restful_auth_rspec/vendor multimedia$ rake spec
(in /Users/multimedia/Desktop/restful_auth_rspec)
2011 Jul 25
7
Adding a folder to my rspec execution path
Hi guys,
I''m using RSpec with Capybara, and for that I created the
spec/integration folder. But when I execute the command "bundle exec
rspec spec" RSpec don''t execute my files on integration folder. I need
to pass each file to solve this problem.
Do you known how I can put the integration folder on rspec execution
path without need to pass each file?
Thanks,
Pablo
2007 Jun 15
3
dynamic specs
I''d like to test that my model attributes are properly protected against mass
assignment, something like:
it "should NOT update :balance on mass assignment" do
@account.attributes = {:balance => 1000}
@account.balance.should_not == 1000
end
instead of doing each attribute manually however, I''d like to automate it so
I can pass a list of attributes which CAN be