similar to: Problems when programmatically defining examples

Displaying 20 results from an estimated 200 matches similar to: "Problems when programmatically defining examples"

2007 May 03
6
RSpec 0.9.2
Behind every great release is a maintenance release. Go get it while it''s hot. We''ve also reworked the website a little - trying to scare off fewer people. Aslak
2007 Nov 26
8
Renaming RailsExample to RailsExampleGroup
Fyi, I made the following renames: * RailsExample -> RailsExampleGroup * FunctionalExample -> FunctionalExampleGroup * ControllerExample -> ControllerExampleGroup * ViewExample -> ViewExampleGroup * HelperExample -> HelperExampleGroup * ModelExample -> ModelExampleGroup This was done to keep the naming consistent with ExampleGroup.
2012 Jan 15
1
NoMethodError: undefined method `expect'
Ideas? ruby-1.9.2-p290 :002 > require ''rspec'' => true ruby-1.9.2-p290 :003 > RSpec::Version::STRING => "2.8.0" ruby-1.9.2-p290 :004 > describe ''division by zero'' do ruby-1.9.2-p290 :005 > expect { 2/0 }.to raise_error ruby-1.9.2-p290 :006?> end NoMethodError: undefined method `expect'' for
2012 Oct 26
8
Puppet 3.0 rspec and custom resources
I am trying to figure out if I am missing something simple here. After upgrading to puppet 3.0 running puppet-rspec tests that use custom resources from modules in the fixtures directory are failing. I have a module that uses the anchor type and with 2.7.19 it works fine. After upgrading to 3.0 all of the tests are failing with Puppet::Error: Puppet::Parser::AST::Resource failed with
2007 Dec 27
5
ExampleGroup and SharedExampleGroup relationship(?)
I''m working on a series going over the source code for rspec, and I ran into something interesting with ExampleGroup and SharedExampleGroup. I was wondering if anyone could shed light on it. [NOTE: I''m working through the code for my own edification in learning Ruby. Ruby has some features that I think are incredibly cool, so I''m using a concrete implementation (RSpec)
2007 Dec 14
13
RSpec-1.1.0 is released
The RSpec Development Team is pleased as glug (that''s kind of like punch, but more festive) to announce RSpec-1.1.0. Thanks to all who have contributed patches over the last few months. Big thanks to Dan North and Brian Takita for their important work on this release. Dan contributed his rbehave framework which is now the Story Runner. Brian patiently did a TON of refactoring around
2007 Nov 18
8
helper methods starting with should
Hi all, As an experiment in playing nice with others, we''ve added the ability in rspec''s trunk to do this: class ThingExamples < Spec::ExampleGroup def should_do_stuff ... end end This is how rspec 0.1 worked, and for people already comfortable with the classes/methods approach of Test::Unit, it is a more comfortable entry point to rspec. For others, however, it
2011 Jan 02
3
undefined method `run_all' for :Array
I''m using the latest ruby 1.9.3-head and recently whenever I run rspec (2.2+) I get the following error: I have seen others have run into this issue, but to resolve it just rolled back to a previous version of rspec or it there a better way? ruby-1.9.3-head/gems/rspec-core-2.3.1/lib/rspec/core/hooks.rb:116:in `run_hook_filtered'': undefined method `run_all'' for []:Array
2010 Sep 01
2
Undefined methods: has_selector? and flunk
I''m in the process of updating an app for Rails 3.0 and rspec-rails 2.0.0.beta20. When I''m running my specs (rake spec) I get a large number of errors caused by two undefined methods undefined method `has_selector?'' for #<String:0x7fdbd0b5b270> undefined method `flunk'' for
2010 May 07
2
Rspec beta8: helper methods issues
Hello everybody, I am experiencing the following problems, I googled quickly but I couldn''t find any documentation or solution to those issues: 1) the generator rails g rspec:helper does nothing; 2) there seems to be no way to test helper methods as I used to do... for example the following spec it ''should set monday as first day of the week'' do
2016 Oct 12
4
Samba 4.5.0 dbcheck problems
Hi all, I've recently upgraded all our DC's (we have 9 spread over various global Sites) to 4.5.0. I run a dbcheck on our FSMO-owner DC once per day from a cron job and this threw up a ton of errors on the first pass after the upgrade. After running it several times with the --fix flag I've got the errors down to 603 but these last errors are refusing to be removed. Here is an
2010 Nov 17
3
How to use request helpers outside of controller specs?
I asked this questions on some other places before, but have found no solution yet. I''d like to include the request helper (from ActionDispatch::Integration::RequestHelpers, like post and xhr methods) also in some specs outside of my controller specs. The problem is that these request helpers are only included in spec/ controller and when a controller is described. What do I have to
2008 Jul 08
1
Strange behaviour with pending specs and implementation_backtrace
Hi all, I''m using my own OutputFormatter with /bin/spec to catch rspec results. I''m experiencing strange behaviour with pending specs and implementation_backtrace. This is my example_pending implementation in rspactor_formatter.rb: class RSpactorFormatter def example_pending(example, message) spec = SpecObject.new( :name => example.description,
2008 Feb 22
7
Testing misc methods in ApplicationController
I''m already successfully testing before_filters in application_controller courtesy of this blog post: http://www.movesonrails.com/articles/2008/01/23/spec-ing-your-application-controller However, i can;''t work out how to test the sort of method that is added to application_controller so that all controllers can use it. It must be something simple that i''m doing
2011 Jan 06
1
View specs - best practices
Howdy, I''m trying to test some mailer views (which is no different to normal views in terms of specs)... ran into the following problem... In adherence to the "one expectation per ''spec''"... I''m trying to write the following describe "auth/mailer/signup.html.erb" do before(:each) do @user = Factory.build(:user) assign(:user,
2010 Jun 20
10
RSpec 2 view example: render_template
On http://github.com/rspec/rspec-rails under "View specs" there''s an example describe "events/index.html.erb" do it "renders _event partial for each event" do assign(:events, [stub_model(Event), stub_model(Event)]) render view.should render_template(:partial => "_event", :count => 2) end end Is this indeed correct? From the
2012 Sep 15
2
[RSpec Testing] Methods take two arguments
Hello, Here is my *pdf_helper.rb* => http://pastebin.com/QU1kTKXk. I want to test, if self.create method can take more than two arguments. But, when I try to run my test. It showed *PdfHelper Should have two arguments Failure/Error: create_pdf.should_receive(object,template).with(user,file) NameError: undefined local variable or method `create_pdf'' for
2016 Oct 14
4
Joining a Windows Server 2008 R2 to existing Samba4 domain
Hi Marc, Thanks for your reply. We are using BIND9_DLZ currently as the DNS backend I manually selected a replication partner (the FSMO roles DC). We do have some errors when doing a dbcheck but I'm not able to fix them. I've detailed this in another post. Here is an example of each type: Example1: *ERROR: incorrect GUID component for member in object
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'',
2007 Dec 17
14
Change in isolation behaviour 1.08 - 1.10 ?
Hi, I just moved from 1.08 to 1.10 and now have one example failing, which, under 1.08, passed. Is the due to a change in behaviour? Here''s my spec (removed some passing examples) require File.dirname(__FILE__) + ''/../spec_helper'' describe "A user" do before(:each) do @user = User.new @valid_user = User.new( :email =>