summaryrefslogtreecommitdiffstats
path: root/spec/unit/rails/param_value_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* maint: clean up the spec test headers in bulk.Daniel Pittman2011-04-131-2/+1
| | | | | | | We now use a shebang of: #!/usr/bin/env rspec This enables the direct execution of spec tests again, which was lost earlier during the transition to more directly using the rspec2 runtime environment.
* maint: just require 'spec_helper', thanks rspec2Daniel Pittman2011-04-081-1/+1
| | | | | | | | | | | rspec2 automatically sets a bunch of load-path stuff we were by hand, so we can just stop. As a side-effect we can now avoid a whole pile of stupid things to try and include the spec_helper.rb file... ...and then we can stop protecting spec_helper from evaluating twice, since we now require it with a consistent name. Yay. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
* Merge branch '2.6.x' into nextNick Lewis2011-01-061-3/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Rakefile lib/puppet/resource/type_collection.rb lib/puppet/simple_graph.rb lib/puppet/transaction.rb lib/puppet/transaction/report.rb lib/puppet/util/metric.rb spec/integration/indirector/report/rest_spec.rb spec/spec_specs/runnable_spec.rb spec/unit/configurer_spec.rb spec/unit/indirector_spec.rb spec/unit/transaction/change_spec.rb
| * (#5771) Upgrade rspec to version 2Matt Robinson2011-01-041-3/+1
| | | | | | | | | | | | | | | | | | The biggest change is that we no longer need to monkey patch rspec to get confine behavior. Describe blocks can now be conditional like confine used to be. "describe" blocks with "shared => true" are now "shared_examples_for". Paired-With: Nick Lewis
| * maint: Fix tests that don't run on their ownMatt Robinson2010-12-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the spec directory I found all the specs that fail when run on their own. for TEST in `find . -name "*.rb" -type f`; do spec $TEST > /dev/null 2>&1 if [[ $? != 0 ]]; then echo $TEST fi done All of them were cases of missing requires. Paired-with: Nick Lewis <nick@puppetlabs.com>
* | maint: Use expand_path when requiring spec_helper or puppettestMatt Robinson2010-12-061-1/+1
| | | | | | | | | | | | | | | | | | Doing a require to a relative path can cause files to be required more than once when they're required from different relative paths. If you expand the path fully, this won't happen. Ruby 1.9 also requires that you use expand_path when doing these requires. Paired-with: Jesse Wolfe
* | maint: Fix tests that don't run on their ownMatt Robinson2010-11-221-0/+1
|/ | | | | | | | | | | | | | | From the spec directory I found all the specs that fail when run on their own. for TEST in `find . -name "*.rb" -type f`; do spec $TEST > /dev/null 2>&1 if [[ $? != 0 ]]; then echo $TEST fi done All of them were cases of missing requires. Paired-with: Nick Lewis <nick@puppetlabs.com>
* Code smell: Two space indentationMarkus Roberts2010-07-091-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced 106806 occurances of ^( +)(.*$) with The ruby community almost universally (i.e. everyone but Luke, Markus, and the other eleven people who learned ruby in the 1900s) uses two-space indentation. 3 Examples: The code: end # Tell getopt which arguments are valid def test_get_getopt_args element = Setting.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args") becomes: end # Tell getopt which arguments are valid def test_get_getopt_args element = Setting.new :name => "foo", :desc => "anything", :settings => Puppet::Util::Settings.new assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args") The code: assert_equal(str, val) assert_instance_of(Float, result) end # Now test it with a passed object becomes: assert_equal(str, val) assert_instance_of(Float, result) end # Now test it with a passed object The code: end assert_nothing_raised do klass[:Yay] = "boo" klass["Cool"] = :yayness end becomes: end assert_nothing_raised do klass[:Yay] = "boo" klass["Cool"] = :yayness end
* [#3994-part 3] rename spec tests from *_spec_spec to *_spec.rbMarkus Roberts2010-06-281-0/+49
| | | | Part 2 re-did the change on the spec files, which it shouldn't have.
* [#3994-part 2] rename integration tests to *_spec.rbMarkus Roberts2010-06-281-49/+0
| | | | | | | | | Some spec files like active_record.rb had names that would confuse the load path and get loaded instead of the intended implentation when the spec was run from the same directory as the file. Author: Matt Robinson <matt@puppetlabs.com> Date: Fri Jun 11 15:29:33 2010 -0700
* [#3994] rename the specs to have _spec.rb at the endMarkus Roberts2010-06-231-0/+49
Some spec files like active_record.rb had names that would confuse the load path and get loaded instead of the intended implentation when the spec was run from the same directory as the file. Author: Matt Robinson <matt@puppetlabs.com> Date: Fri Jun 11 15:29:33 2010 -0700