Displaying 20 results from an estimated 3000 matches similar to: "Specing Layouts"
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
2008 Sep 14
2
rake spec:rcov => [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i386-mswin32]
i have a rails app that tests fine with "rake spec" but gets a
segmentation fault when "rake spec:rcov" is run.
i am on windows xp, ruby 1.8.6, rails 2.1.1, mysql 5
my app is at
http://github.com/scottnj/test_blog/tree/master
so maybe someone can try to replicate my error so i know if the
problem is with my code or something installed on my pc.
here is a copy of my shell
2012 Nov 06
2
rspec failure upon revisit
I just returned from a different project after taking a few weeks off of
my tutorial. I''m using Ruby on Rails 3 Tutorial - Learn Rails by
Example by Michael Hartl.
After rebooting my server I ran an rspec spec/ command to check to see
if there were any problems and this is what I received. I didn''t modify
anything except I did overwrite users_controller.rb and
2007 Nov 21
6
failing rake task
I''m running rspec and rspec on rails in svn external so I am running
the latest version of the trunk. Recently the rake spec task started
braking the continuous integration server because the rake aborted. I
checked my local and it ran with the same behavior.. and all of the
devs on my team are now experiencing the same problem. All the spec''s
are passing, but the rake task is
2007 Dec 07
4
mrblog rake task fails
Hi all,
I''m trying to run the mrblog sample application but somehow the rake
task fails:
--
Los-Angeles:~/Projects/mrblog Ulf$ rake db:schema:load --trace
(in /Users/Ulf/Projects/mrblog)
rake aborted!
Don''t know how to build task ''db:schema:load''
/opt/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1472:in `[]''
2007 Nov 25
15
Possible Problem with RSpec and
Sorry to be such a pest but I am trying to learn Ruby, Rails and RSpec all
at one go and it is a bit overwhelming. I have previously completed the
depot tutorial in the Agile Web Dev with rails book and now I am trying do
do it again using RSpec.
What I would like to know now is why I am getting a rake failure error at
the end of every spec:models run. Is this the expected behaviour when a
test
2007 Jul 25
1
strange rake behavior
I''m getting some really really really odd testing behavior.
1. Running rake test:units passes with flying colors. (Well, that''s
not what I mean by weird, but I suppose it is ;) )
2. Running rake test:functionals yields something like
..........................E..............EEEEE.......EEEE...rake
aborted!
But doesn''t print any stack traces or error message output
2007 Nov 21
3
Cannot freeze gems
Running rake rails:freeze:gems I got the following error:
[root@WiNN-Mesh web_interface]# /usr/local/bin/rake rails:freeze:gems
--trace
(in /usr/sbin/web_interface)
** Invoke rails:freeze:gems (first_time)
** Execute rails:freeze:gems
Freezing to the gems for Rails 1.2.5
rm -rf vendor/rails
mkdir -p vendor/rails
cd vendor/rails
rake aborted!
uninitialized constant Gem::GemRunner
2007 Sep 25
12
Problems with expect_render
Hi there,
I''ve been working with RSpec for about a week now, and the process of
moving from a Test::Unit + Mocha setup to an RSpec + Mocha
environment has been pretty straightforward.
Except, I''m having problems with using template.expect_render.
I have Mocha enabled with:
> config.mock_with :mocha
in spec_helper. And then I have a view spec which looks like this:
2007 Sep 10
6
RSpec view spec writing problem (unable to generate url_for in RESTful resource link_to)
Thanks, first, to everyone who''s asked and answered questions on this list,
and to the creators of RSpec - it is all very helpful. I''ve searched the
mailing list, and had a couple 2hr googling sessions that didn''t help me
find an answer.
I''ve run into a problem getting my first non-trivial view spec to run. I
get an error when trying to generate a link_to()
2007 Nov 22
11
Initial run of RSpec 1.0.8 on MS-WinXPproSP2
Rails 1.2.5
Ruby 1.8.6
Rake 0.7.3
RSpec 1.0.8
PostgreSQL 8.2.5
I am experiencing a problem with the "rake spec spec" task on an initial
trial of rspec. After creating the rails app I installed rspec and
rspec_on_rails in the vendor\plugins subdirectory from svn. I then used
ruby script\generate rspec_model product. I next manually created the
database instances depot_development and
2007 Aug 07
4
Execute additional commands after creating database?
I''m writing some code that accesses some lagacy database on
PostgreSQL. Since the old database had some really ughly and weird
naming conventions (like CamelCase). To work around this I created a
second schema (named rails) in the same database and gave the tables
and fields some rails-friendly names. The database user that Rails
uses has its search_path set to the rails schema. That way
2007 Nov 09
9
fixture_file_upload and edge rspec?
Hi all,
I had some specs that were using fixture_file_upload that were
passing just fine. Then I froze edge rails to get some 2.0
functionality, then a I upgraded to trunk rspec to deal with
uninitialized constant ActionView::Helpers::JavaScriptMacrosHelper
After a couple other of tribulations, I have now gotten down to just
a couple of not passing specs, all using the fixture_file_upload.
2007 Nov 09
26
RSpec on Rails 2.0
I have a project on edge rails that I''m trying to convert from Test:Unit
to rspec. I have the rspec gem version 2338, the rspec and
rsepc_on_rails version 2831 in vendor/plugins, and rails version 8117 in
vendor/rails.
I''ve been able to get a few specs passing, have gotten the specs running
from autotest, and am able to do "rake spec:doc" and get the basic
command
2007 Apr 25
9
Running specs for a plugin - undefined method ''define'' for object
I''m trying to write specs for a plugin I''m developing named audit_fu, and
I''m running into a problem which I can''t get past it. I''ve got the same
specs setup in the main rails app, and everything works fine there, it''s
just running the plugin specs that I''m having a problem with. My setup is:
- edge rails
- edge rspec (in
2008 Aug 08
2
template.expect_render fails when partial is rendered from a helper
My spec;
describe ''subnav rendering while logged in'' do
before do
template.stub!(:logged_in?).and_return(true)
template.stub!
(:current_profile).at_least(:once).and_return(mock_profile)
end
def do_render
render "/homepages/show.html.erb"
end
it "should render the logged in partial for homepages" do
2008 Jun 04
8
Why has the --color gone from my life?
Hi all,
Running on OSX 10.5.3, Latest Rspec trunk, Rspec rails trunk, latest
autotest gem and rails 2.1
I''ve lost my colour output in autotest.
rake spec gives colour output, but autotest gives me black and white.
It was working a little bit before, I think I upgraded to the latest
versions of everything to get all the textmate snippets talking and being
friendly to one another again
2008 Apr 19
4
Is testing output within content_for possible?
I wanted to test that the links below were being rendered in the views.
- content_for :sidebar do
%ul.links
%li= edit_link edit_admin_contact_url(@contact), "Contact"
# view test
it "should have the correct side bar links" do
do_render
response.should have_tag("ul.links") do
with_tag("a[href=?]",
2011 Apr 12
4
OS X - `require': no such file to load -- sqlite3/sqlite3_native
I''ve searched and search, tried a number of things like unstalling
sqlite3 and reinstalling. Reinstalling Rails, building sqlite3 from
source, etc. Nothing seems to work. When I try to start up my server I
get the following:
MacBook-Pro:splash Ross$ rails server
/Volumes/Macintosh
HD/Users/Ross/rails_projects/splash/json/ruby/1.9.1/gems/sqlite3-1.3.3/lib/sqlite3.rb:6:in
2010 Apr 15
11
Rails 3, Rspec 2, Autotest
Trying to set up a Rails 3 project with RSpec and Autotest. I followed
these steps exactly:
http://gist.github.com/365816
But when I start up autotest, I get:
$ autotest
loading autotest/rails
style: Rails
instead of:
$ autotest
loading autotest/rails_rspec2
style: RailsRspec2
And autotest doesn''t seem to do anything. Any idea what''s happening?
I''m using Ruby