Displaying 20 results from an estimated 20000 matches similar to: "How to remove this deprecation warning"
2012 Jan 15
2
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. (rspec + haml)
I upgraded a small project that I had created on 3.1.3 to 3.2.0.rc2.
Running rspec on it brings about a large amount of these messages:
DEPRECATION WARNING: Passing a template handler in the template name is
deprecated. You can simply remove the handler name or pass render :handlers
=> [:haml] instead. (called from block (2 levels) in <top (required)> at
2006 Nov 10
3
Specifying views
I''m trying to spec my views with 0.7.1 on edge rails per the
instructions on the rspec site [1] and David''s blog [2], but I''m not
having much luck. Here''s my spec in specs/views/accounts/
new_view_spec.rb:
require File.dirname(__FILE__) + ''/../../spec_helper''
context "The new account form" do
specify "should have an
2008 Jun 14
15
Reusing story snippets
I find myself doing this:
Scenario "logged in user visiting the home page" do
Given "A logged in user" do
a_logged_in_user
end
When "..."
Then "..."
end
The a_logged_in_user method is a helper method in helper.rb which sets
up the state so that the user can browse the website.
Later in the story of course, I can just do ''Given
2012 Sep 27
3
load global variable so I can access in spec files
In my spec_helper, I want to load yaml file to a variable, and then be able
to use that in my tests.
spec_helper.rb:
RSpec.configure do |config|
end
config = YAML::Load(......)
some_spec.rb
describe ''blah'' do
it "should be...." do
MyClass.new( config[''test''] )
end
end
How can I do this?
-------------- next part --------------
An
2013 Jun 18
1
Getting rspec error: Net::SMTPServerBusy: Relay access denied
I''m trying to test registration emails (sent with devise), and I keep
getting the error:
Net::SMTPServerBusy: 454 4.7.1 <model_spec-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>: Relay access denied
I''m running Rails 3.2.11 with Capybara, and I have (temporarily) chopped my
spec_helper.rb and test.rb files down to the bare minimum, still getting
the error above.
2012 Oct 18
3
Issues upgrading RSpec
My specs work fine with this in my Gemfile.lock:
grep rspec Gemfile.lock
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
rspec-mocks (~> 2.11.0)
rspec-core (2.11.0)
rspec-expectations (2.11.1)
rspec-mocks (2.11.1)
rspec-rails (2.11.0)
rspec (~> 2.11.0)
rspec-rails (~> 2.11)
After "bundle update
2007 Mar 02
2
database modifications not rolling back
Hi,
Since moving this morning from 0.7.5.1 to 0.8.2 I''ve hit some
problems and I''m not sure if it''s something I''m doing wrong or a
change in 0.8.2
Basically I dislike fixtures so I have been using a helper method to
create an object I need frequently and setting it up in the setup
method, in 0.7.5.1 this all worked fine - but since moving to 0.8.2
2011 Aug 10
1
How to stop Rspec loading my Cucumber fixtures
I have a bunch of fixtures designed to populate the database for my Cucumber
integration tests.
But at this stage I want my database to be empty when using Rspec.
So, I moved the fixtures from `/spec/fixtures` to
`features/support/fixtures`, and updated `features/support/env.rb` to read:
Fixtures.reset_cache
fixtures_folder = File.join(RAILS_ROOT, ''features'',
2011 Dec 05
1
How to extend common helper methods to view specs?
Hi, there,
I have some methods which I have written as helpers.
They are in spec/support/controller_macros.rb (yes, I will change the
name soon).
The 2 methods, login_user and login_admin_user works in the
controller specs BUT fail to work in the view specs when I call them
in the view specs.
---------- spec/spec_helper.rb start --------------------------
# This file is copied to spec/
2012 May 25
4
rspec first steps troubles
I try do implement tests for my puppet code and was playing with
rspec-puppet but the following code gives me errors
require ''spec_helper''
describe ''irqbalance'' do
it { should include_class(''irqbalance'') }
it { should include_class(''irqbalance::data'') }
it { should
2007 May 02
13
RSpec 0.8.2 pain, missing spec/rails?
Hi. I''m upgrading a project from an 0.8.0 pre-release gem to 0.8.2.
I''ve installed the 0.8.2 gem, and the rspec_on_rails 0.8.2 plugin:
ruby script/plugin install
svn://rubyforge.org/var/svn/rspec/tags/REL_0_8_2/rspec
When I try to run my specs though, I get the below error. It''s as if the
spec_helper cannot find "spec/rails". I''ve noticed that
2012 Jun 03
3
rspec spec_helper
Hi,
I was playing with rspec and every time I find a possible improvement
that could be made in spec_helper or rakefile I have to change it in
every module that is using rspec tests. So maybe these things could be
centralized, I thought to myself.
I found the following module, actually.
https://github.com/puppetlabs/puppetlabs-module_spec_helper
But I am at a lost how to use it.
Is it supposed
2011 Oct 08
1
Rails view spec expectations/matchers
>From looking at the RSpec Rails documentation
(https://www.relishapp.com/rspec/rspec-rails/docs/view-specs/view-spec) it
seems like rendered is just a string and you can''t really do any
assert_select type stuff out of the box.
After Googling around, it seems that the RSpec authors decided that if you
want that functionality, you should just use Capybara or some such... is
that
2007 May 10
1
RSpec 0.9.4
RSpec 0.9.4 has just been released. Gems haven''t rsync''ed around the
globe yet, so you might have to wait a few hours to install it.
The big news this time is Spec::Ui 0.2.0, which has been released
along with RSpec core. This RSpec extension gives you custom Watir
matchers (custom Selenium-RC matchers are not implemented yet).
Moreover, it comes with a custom KICK ASS formatter
2007 Dec 12
3
undefined method: controller_name
With rspec 1.0.8 I have a spec in the directory:
spec/units/controllers/application_controller_spec.rb
require File.dirname(__FILE__) + ''/../../spec_helper''
class DummyController < ApplicationController
def index
raise "Prevent index from rendering"
end
end
describe ApplicationController, "Handling errors in production",
:behaviour_type =>
2007 Dec 19
5
Installation Trouble
Hey all,
I''m new to BDD and rspec, but I am very intrigued.
I tried installing rspec and rspec_on_rails into my Rails app, but I am
having some trouble.
I chose to install both as plugins, as the documentation suggests. I
checked out the CURRENT tag from svn, and copied the rspec and
rspec_on_rails directories into my app''s vendor/plugins directory. Then
I ran
2008 May 21
2
running rspec on 1.2.3 ??
Hi,
Anyone know how to run rspec on 1.2.3?
It fails out of the box....
I newly downloaded rspec, rspec_on_rails and ran the command
ruby script/generate rspec ==>>> Does this script work right?
from the instructions http://rspec.info/documentation/rails/install.html
I then created the directories in spec:
controllers, fixtures, helpers, models, views
I then created the
2007 Nov 29
4
Rollbacks, Sqlite3 bug. Has this been reintroduced ?
Hey,
I just updated from the edge and it looks like this _issue_ has resurfaced.
Yesterday things were working (stories and specs).
No code base changes, only rspec and rspec_on_rails
After updating today I now need to set <config.txn...fixtures> to false in
the spec_helper.rb
to get the specs running, the stories are fine. Looks like the fixture
loading is trying to start a txn.
I
2006 Nov 27
1
rSpec website tutorial correction
Hi there,
On page
http://rspec.rubyforge.org/documentation/rails/writing/views.html the
view spec example is incorrect.
Instead of:
require File.dirname(__FILE__) + ''/../../spec_helper''
It should read:
require File.dirname(__FILE__) + ''/../spec_helper''
Regards,
Keith
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