Displaying 20 results from an estimated 43 matches for "examplegroup".
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) as a learning tool to see...
2007 Dec 14
13
RSpec-1.1.0 is released
...m
Test::Unit to RSpec with or without Rails:
1. Start with a TestCase:
require ''test/unit''
class TransitionTest < Test::Unit::TestCase
def test_should_be_smooth
transition = Transition.new(
:from => "Test::Unit::TestCase",
:to => "Spec::ExampleGroup"
)
assert_equal "really smooth", transition.in_practice
end
end
2. Require ''spec''
require ''test/unit''
require ''spec''
class TransitionTest < Test::Unit::TestCase
def test_should_be_smooth
transition = Transitio...
2010 Oct 21
0
ExampleGroup in Rspec 2
Hello,
In Rspec 1.x I I could create custom ExampleGroups that would have
behaviour similar to controller specs. How can I accomplish something
similar to this in Rspec 2? I would like to create an example group to
test my Cells instances ( http://github.com/apotonick/cells ).
Thanks!
2011 Mar 09
1
undefined method `flunk' for #<Spec::Example::ExampleGroup::Subclass_1:0x0000000516bd40>
...interact with it.
if @session
@session.load_stdapi
else
flunk "Couldn''t get a session!"
end
end
end
And the error:
undefined method `flunk'' for
#<Spec::Example::ExampleGroup::Subclass_1:0x0000000516bd40>
I believe this method is contained within the rspec-rails classes and
i''m not using those in this case. Is there an alternative to using flunk
- Suggestions?
jcran
--
Jonathan Cran
jcran at 0x0e.org
515.890.0070
2008 Oct 18
4
Problems when programmatically defining examples
..."RAutotest::Runner::Formatter"], @output, @output)
example_groups.each {|example_group|
options.add_example_group(example_group) }
Spec::Runner::CommandLine.run(options)
Building the example groups:
examples =
Class.new(Spec::Example::ExampleGroup).describe("Statistics")
@expectations.map do |expectation|
examples.it examples.description do
actual_stats_counters.should expectation
end
end
examples...
2010 Aug 30
1
undefined method `route_for' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:
Hello, all, I have this error with my rspec - controller - test, and
yes, I do found the thread with the same error here, but it isn''t
helped me, think it''s not my case.
i have rails -v = Rails 3.0.0.rc, rspec -v = 2.0.0.beta.18 (hope they
should match each other).
my test is here: spec/controllers/posts_controller_spec.rb and i ran
it with command: rspec
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 has created a problem: you can''t write helper
methods that st...
2009 Feb 01
8
undefined method `inherit'' for Merb::Test::ExampleGroup
RSpeckers:
I''m trying to install this into a Merb-generated RSpec rig:
http://code.jeremyevans.net/doc/fixture_dependencies/
It requires inserting their test case into RSpec. This is the documented way to
do it:
describe ''Post'' do
inherit FixtureDependencies::SequelTestCase
And that leads to the syntax error in the subject line. (No stack trace is
available
2010 Sep 01
2
Undefined methods: has_selector? and flunk
...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
#<RSpec::Core::ExampleGroup::Nested_15::Nested_1::Nested_2::Nested_2:0x7fdbd0c48fe8>
I''ve seen the upgrade notice for beta20 and now include capybara
explicitly in the test group of my Gemfile. The...
2010 May 07
2
Rspec beta8: helper methods issues
...thods as I used to do...
for example
the following spec
it ''should set monday as first day of the week'' do
helper.ordered_day_names.first.should == ''Lun''
end
raises the error undefined local variable or method `helper'' for
#<Rspec::Core::ExampleGroup::Nested_2::Nested_1:0x2da5d10>
3) testing views where I call helper methods I need to explicitly stub
out the helper methods, even if I include the helper module.
This all happens with rspec beta 8, rails 3.0beta3, and ruby 1.9.2
Regards
Andrea
2008 Jan 31
4
RSpec-1.1.3
...ode) fail. Closes #203.
* Moved at_exit hook to a method in Spec::Runner which only runs if
specs get loaded. Closes #242.
* Applied patch from kakutani ensuring that base_view_path gets
cleared after each view example. Closes #235.
* More tweaks to regexp step names
* Fixed focused specs in nested ExampleGroups. Closes #225.
More info at http://rspec.info.
Cheers,
David
2013 Mar 02
0
Problems getting rspec testing working in OSX?
....F
Failures:
1) apache On a Debian OS with no package name specified
Failure/Error: should contain_package(''httpd'').with( { ''name'' => ''apache2'' } )
NoMethodError:
undefined method `contain_package'' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x11038d630>
# ./spec/classes/apache_spec.rb:13
2) apache On a RedHat OS with no package name specified
Failure/Error: should contain_package(''httpd'').with( { ''name'' => ''httpd'' } )
NoMethodError:
undefined...
2016 Oct 12
4
Samba 4.5.0 dbcheck problems
...hrew 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 example of each type:
Example1:
*ERROR: incorrect GUID component for member in object
CN=examplegroup,OU=Groups,DC=example,DC=internal,DC=com -
<GUID=77ad92b5ade70e449dcc481624928310>;<RMD_ADDTIME=130393476680000000>;<RMD_CHANGETIME=130976799640000000>;<RMD_FLAGS=1>;<RMD_INVOCID=98307faefea70749933e6946b1b14420>;<RMD_LOCAL_USN=1445979>;<RMD_ORIGINATING_USN=303...
2012 Sep 15
2
[RSpec Testing] Methods take two arguments
...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
#<RSpec::Core::ExampleGroup::Nested_1:0xabf72f0>
# ./pdf_helper_spec.rb:13:in `block (2 levels) in <top (required)>''
*here is my pdf_helper_spec.rb file:
*
require ''pdf_helper''
describe "PdfHelper" do
it "Should be in public folder" do
fil...
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
2011 Jul 06
0
undefined method `assigns' and undefined method `post'
Hi,
I have an error of undefined method.
can anyone help me to solve it.
I follow the tutorial to practicing testing controller of rails, and
now i got stuck with the error.. plz help
error:
undefined method `post'' for
#<Spec::Example::ExampleGroup::Subclass_1:0xb7754114>
undefined method `assigns'' for
#<Spec::Example::ExampleGroup::Subclass_1:0xb785d1b4>
Test file
describe "GET Index" do
def mock_product(stubs={})
@mock_user ||= mock_model(User, stubs).as_null_object
end
def setup
@user = User.new...
2012 Sep 16
0
tutorail test writing problem
...b.com/roelof1967/demo_app
And the faiing message is :
Failures:
1) Static pages Home page should have the content ''Sample App''
Failure/Error: visit ''/static_pages/home''
NoMethodError:
undefined method `visit'' for
#<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x0000080572bf98>
# ./spec/requests/static_pages_spec.rb:8:in `block (3 levels) in <top
(required)>''
Finished in 0.0099 seconds
1 example, 1 failure
Failed examples:
rspec ./spec/requests/static_pages_spec.rb:7 # Static pages Home page
should have the...
2014 Apr 04
0
Rspec not running properly
...stract_store.rb:28:in
`initialize'.
Rack::File headers parameter replaces cache_control after Rack 1.5.
FFFFFFFFF
Failures:
1) PagesController GET 'about' returns http success
Failure/Error: get 'about'
NoMethodError:
undefined method `get' for
#<RSpec::ExampleGroups::PagesController_2::GETAbout:0x69b85d8>
# ./spec/controllers/pages_controller_spec.rb:39:in `block (3
levels) in <top (required)>'
2) PagesController GET 'about' should have the right title
Failure/Error: get 'about'
NoMethodError:
undefined met...
2010 Aug 11
6
rspec2 not working with shoulda
....beta.19"
gem "cucumber-rails", "= 0.3.2"
gem "capybara"
gem "launchy"
end
I am getting following error message.
Failure/Error: it { should validate_presence_of(:email) }
undefined method `validate_presence_of'' for
#<RSpec::Core::ExampleGroup::Nested_2:0x10a63e3a8 @__memoized={}>
# ./spec/models/user_spec.rb:5
2010 Jun 20
10
RSpec 2 view example: render_template
...Is this indeed correct? From the outset, it looks wrong because it sets
an expectation (view.should ...) after the call to render.
Then, no matter if I leave that line where it is or put it before the
render, I get an exception
undefined method `render_template'' for
#<RSpec::Core::ExampleGroup::Nested_1:0x7f6c0632fea0>
Michael
--
Michael Schuerig
mailto:michael at schuerig.de
http://www.schuerig.de/michael/