similar to: Rspec-puppet: what is differences between contain_class, include_class, create_class?

Displaying 20 results from an estimated 5000 matches similar to: "Rspec-puppet: what is differences between contain_class, include_class, create_class?"

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
2012 Oct 04
3
Need help with rspec-puppet
Hello Everyone, I am fairly new to puppet and I would like to run som unit tests. I hope rspec is the right tool for it. Unfortunately, after setting it up, when I try to execute it I receive the following error: Failures: 1) helloworld Failure/Error: it { should include_class(''helloworld'') } Puppet::Error: Error converting value for param
2010 Sep 08
4
Re-using Rspec Matchers
Hey Everyone, Is it good practice to call matchers from within matchers? Kinda like this pattern: See: http://gist.github.com/570467 -- Brian
2011 Jul 28
2
RSpec, shoulda-matchers and Rails model attributes validations
I was trying out RSpec framework in a project and got stopped doing the unit test of a model. In particular, doing the test for the associations and the ActiveRecord validations. I started writing the validations but my tests didn''t look DRY at all. Before refactoring the tests checked out and look for other people solutions. I found out shoulda-matchers and Shoulda (which if I
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
2008 Jun 03
9
Build rspec-rails as a gem?
I can''t figure out how to build rspec-rails as a gem when just cloned from github... there isn''t any .gemspec file or rake task that does this. Any help? -- Posted via http://www.ruby-forum.com/.
2011 Sep 14
1
rspec and should have_many through
Hi, Anyone can help me with rspec shoulda validations please. I can''t get the syntax right for these validations. Please correct me it { should have_one :tradable, :through => :trade_order} it { should belong_to :source, :polymorphic => true } it { should have_many :transfers, :as => :source } this is for Rspec 2, rails 3.1, gem "rspec-rails" gem
2007 Mar 12
10
using mocha with rspec
Hi folks. I''ve just started using rspec and I have to say it''s very nice. The thing is, I prefer mocha''s mocking dialect. So I thought a simple require ''mocha'' would set me up. Unfortunately, rspec does all its goodness using do/end blocks in anonymous classes, so it wasn''t quite that obvious. Anyway, here is the incantation I ended up
2011 Jul 25
6
What does using a lambda in rspec tests accomplish?
Here is the code in question: describe UsersController do render_views … … describe "POST to ''create'' action" do describe "failure" do before(:each) do @attr = { :name => '''', :email => '''', :password => '''', :password_confirmation =>
2012 Nov 18
3
remarkable activerecord association RSpec
i''m using gem Remarkable activerecord for association. i''ve installed remarkable and remarkable activerecrod both gem. i''ve added both gem in my Gemfile. i''ve added "remarkable_activerecord" as required in spec_helper.rb. describe Authentication do FactoryGirl.build(:authentication).should belong_to(:user)
2010 Jun 20
7
rspec-rails 2.0.0.beta.12 showing undefined method error for route_to
First of all, I''ve been trying to find an answer for this problem all over the internet without luck. The thing is that I am using RVM with ruby 1.9.2-head and I created a new empty gemset. Then I installed bundler gem with: gem bundler install That installed the library into the /Users/damselem/.rvm/gems/ ruby-1.9.2-head at rails3/gems directory. Then I went to my rails 3 app
2007 Dec 27
3
RSpec on Ruby 1.9: before(:all) (Not Yet Implemented) pending messages instead of tests
On Dec 27, 2007 3:18 PM, Shot (Piotr Szotkowski) <shot at hot.pl> wrote: > Shot (Piotr Szotkowski): > > > I happily hand-compiled Ruby 1.9.0-0 into /home/shot/opt/ruby today > > and I''m running into a strange error with RSpec ? all my examples work > > perfectly with Ruby 1.8 but are considered peding on Ruby 1.9. > > FWIW, I get the same result with
2010 Jun 28
1
have_tag matcher in rspec 2?
I always assumed have_tag was part of rspec, but it''s not in rspec 2, and looking now I don''t see it in rspec 1 either. Webrat defines it, but that seems like a coincidence (I tried requiring webrat/core/matchers to no avail). Is it depricated, not yet implemented, or does it work for everyone else? My project is from scratch, rspec-rails 2b13, using generated spec_helper.
2006 Aug 15
20
Talking to Java APIs
I''m trying to figure out how Ruby in general, and/or anything extra Rails may have, can talk to Java APIs of third party server apps. After quite a few search attempts net-wide and on ruby forums, and with "Programming Ruby" in hand, I''m coming up with zilch. Either I''m not finding it, or I''m not recognizing it. I''m assuming there has
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 Jun 12
3
rspec 1.0.x and liquid?
Is anyone else using liquid with the > 1 rspec? This seems to fail: it ''should render show'' do response.should render_template(''buyers/show'') get :show, :id => 1 end with an error like 1) NoMethodError in ''/buyer GET should render show'' You have a nil object when you didn''t expect it! The error occurred
2007 Sep 05
3
Rspec Caveman questions.
Hello! I''m just a caveman with some caveman questions. I''ve been parsing Rspec for quite a while, and I''m writing my first series of specs. My initial impressions are "Verbose, but understandable. Helpful and intuitive, but so much to digest." I want to congratulate the folks who are dedicating a chunk of their lives to writing this, and ask 2 caveman
2007 May 29
12
questions rspec on rails
Hi, rather than flooding this list with separate emails, I''ve been queueing up questions using rspec with rails. (an irc channel would be nice too :) Here ya go... - Is there a way to test named routes? - Could I get an example how to test an ajax request (link_to_remote)? would that go in view? and/or in controller spec? - Can you assert which layout template is rendered in a
2011 Sep 08
1
Magic Multi Connections gem + Rails 3.1
Hello, Like in topic, did anyone tried to run this gem under 3.1? I''m getting error that mirror_db_connection is not valid key: ArgumentError: Unknown key: mirror_db_connection from /Users/nopik/.rvm/gems/ruby-1.9.2-p180@christmas/gems/ activesupport-3.1.0/lib/active_support/core_ext/hash/keys.rb:44:in `block in assert_valid_keys'' from
2007 Oct 09
23
Testing layouts with RSpec on Rails
Hey guys, Does anyone have any wisdom to share on the subject of speccing Rails layouts? Most of it''s plain old view specs stuff, but are there sensible ways to verify things like the yield call? (Mocking doesn''t catch that) Thanks, Matt -- Matt Patterson | Design & Code <matt at reprocessed org> | http://www.reprocessed.org/