Bot releases are hidden (Show)
Bug fixes:
TextMateFormatter
that prevented backtrace linksPublished by myronmarston over 10 years ago
Enhancements:
is_expected
for one-liners that read well with theexpect
-based syntax. is_expected
is simply defined asexpect(subject)
and can be used in an expression like:it { is_expected.to read_well }
. (Myron Marston)skip
from RSpec 3, which acts like pending
did in RSpec 2pending
is changing inDeprecations:
mock_with
config options. RSpec 3 will only support:rspec
, :mocha
, :flexmock
, :rr
or :nothing
show_failures_in_pending_blocks
config option. To achievepending
skip
instead to preserveRSpec::Core::Reporter#abort
in favor ofRSpec::Core::Reporter#finish
. (Jon Rowe)Bug Fixes:
path
) in end-of-run summaryraise_errors_for_deprecations!
is configured. (Myron Marston)Published by myronmarston over 10 years ago
Breaking Changes for 3.0.0:
mock_with
option more strict. Strings are no longer supportedmock_with "mocha"
) -- use a symbol instead. Also, unrecognizedmock_with :nothing
(as has been documented for a long time).:if
and :unless
RSpec::Core::Formatters.register(formatter_class, *notifications)
notifications
is the list of events the formatter wishes to:alias
option forRSpec.configuration.add_setting
. (Myron Marston)RSpec.configuration.requires = [...]
.--formatter
CLI option. (Myron Marston)--configure
CLI option. (Myron Marston)RSpec::Core::RakeTask#spec_opts=
.pending
block or :pending
metadata now executesxexample
, xit
,xspecify
, or via a new skip
method or :skip
metadata option.pending
inside an example, the remainder of the example willskip
method.skip
or pending
without a block. (Xavier Shay)before(:all)
hooks. Use skip
show_failures_in_pending_blocks
configuration option. (Xavier Shay)Enhancements:
is_expected
for one-liners that read well with theexpect
-based syntax. is_expected
is simply defined asexpect(subject)
and can be used in an expression like:it { is_expected.to read_well }
. (Myron Marston)rspec --init
. (Myron Marston)config.alias_example_group_to
, which can be used to define axdescribe
and xcontext
as shortcuts to make an example groupfdescribe
and fcontext
as shortcuts to focus an example group.#at_exit
by default. require 'rspec/autorun'
ruby
, as it always has been.rake
or rspec
are both unaffected. (Ben Hoskings)expose_dsl_globally
config option, defaulting to true. When disabledmain
and Module
describe
, shared_examples_for
, etc). (Jon Rowe)describe
,shared_examples_for
, etc) on the RSpec
constant. Intended for useexpose_dsl_globally
is set to false
. (Jon Rowe)context
) on the RSpec
constant. If expose_dsl_globally
is set totrue
, also expose them on main
and Module
. Historically, only describe
Bug Fixes:
path
) in end-of-run summaryraise_errors_for_deprecations!
is configured. (Myron Marston)failure_exit_code
is used by the rakeline_number
default_path
. (Matijs van Zuijlen)Published by myronmarston almost 11 years ago
Breaking Changes for 3.0.0:
RSpec::Core::ExampleGroup#example
andRSpec::Core::ExampleGroup#running_example
methods. If you needTextMateFormatter
, it has been moved to rspec-tmbundle
.Spec
and Rspec
constants (rather than RSpec
).Spec::Runner.configure
rather than RSpec.configure
.Rake::SpecTask
rather than RSpec::Core::RakeTask
.share_as
. (Myron Marston)--debug
option (and corresponding option onRSpec::Core::Configuration
). Instead, use -r<debugger gem name>
toruby-debug
,debugger
, or pry
). (Myron Marston)let
or subject
declaration isbefore(:all)
or after(:all)
hook. (Myron Marston)its
support to a separate gem. (Peter Alfvin)RSpec::Core::Configuration#output
andRSpec::Core::Configuration#out
aliases ofRSpec::Core::Configuration#output_stream
. (Myron Marston)Enhancements
failure_color
.--no-fail-fast
command line option. (Gonzalo Rodríguez-Baltanás Díaz)--profile
information. (Alex / @MasterLambaster)treat_symbols_as_metadata_keys_with_true_values
but--dry-run
option, which prints the formatter outputspec_helper.rb
Deprecations
treat_symbols_as_metadata_keys_with_true_values
is deprecated and noPublished by myronmarston almost 11 years ago
Enhancements
it
, before(:each)
, after(:each)
, let
and subject
)include_examples
and it's aliases. (David Chelimsky)expose_current_running_example_as
config option forRSpec::Core::ExampleGroup#example
andRSpec::Core::ExampleGroup#running_example
methods. (Myron Marston)config.raise_errors_for_deprecations!
option, which turnsDeprecations
RSpec::Core::ExampleGroup#example
andRSpec::Core::ExampleGroup#running_example
methods. If you needautotest/rspec2
in favour of rspec-autotest
. (Jon Rowe)-rruby-debug
(for the ruby-debug gem) or -rdebugger
(for theRSpec.configuration.treat_symbols_as_metadata_keys_with_true_values = false
.false
. (Myron Marston)let
or subject
declaration inafter(:all)
hook. (Myron Marston, Jon Rowe)its
usage in favor of rspec-its
gem due to plannedRSpec::Core::PendingExampleFixedError
in favor ofRSpec::Core::Pending::PendingExampleFixedError
. (Myron Marston)RSpec::Core::Configuration#out
andRSpec::Core::Configuration#output
in favor ofRSpec::Core::Configuration#output_stream
. (Myron Marston)register_ordering(:global)
instead of these:
RSpec::Core::Configuration#order_examples
RSpec::Core::Configuration#order_groups
RSpec::Core::Configuration#order_groups_and_examples
RSpec::Core::Configuration#order
RSpec::Core::Configuration#randomize?
--order default
is deprecated in favor of --order defined
Published by myronmarston almost 11 years ago
Bug fixes:
example.execution_result[:exception].pending_fixed?
(whichRSpec::Core::PendingExampleFixedError
(which was renamedRSpec::Core::Pending::PendingExampleFixedError
in 2.8.Published by myronmarston about 11 years ago
Bug fixes:
Published by myronmarston about 11 years ago
Bug fixes:
NoMethodError
that was being raised when there were no sharedRSpec.world.reset
is invoked.shared_examples
are declared at top level in a module
scope.dump_profile
isn't defined (Alex / @MasterLambaster, Jon Rowe)Published by myronmarston about 11 years ago
Bug fixes
-r
option)RSpec::Mocks
and RSpec::Expectations
when referenced ifRSpec::Matches
has been autoloadedrspec
gem, we changed it recently to stoprspec/mocks
and rspec/expectations
by default, as somerspec --profile path/to/spec.rb
:path/to/spec.rb
arg was being wrongly treated as the profile
0
using to_i
, causing no profiledPublished by myronmarston over 11 years ago
Bug fixes
RSpec::Core::RakeTask
soPublished by myronmarston over 11 years ago
Bug fixes
respond_to?
a notification, but hadstart
on the deprecationBug fixes
#start
on the Deprecation Formatter to prevent collision withruby-debug
on JRuby (Alex Portnov, Jon Rowe)Published by myronmarston over 11 years ago
Enhancements
fit
(equivalent ofit "description", focus: true
) (Michael de Silva)Bug fix
let
take precedence over othersEnhancements
--color
handling.--profile
option.--fail-fast
--profile
options are used (Paweł Gościcki).spec
to the load path, add the configured--default-path
to the load path (which defaults to spec
). Thisbacktrace_inclusion_patterns
config option. Backtrace lines-
when parsing .rspec
as ERB.rspec-local
in the configuration documentation{a,b}
shell expansion syntax in --pattern
optionconfig.libs
returns the libs configured to be added onto the load pathfull_backtrace?
returns the state of the backtrace cleanerdebug?
returns true when the debugger is loadedline_numbers
returns the line numbers we are filtering by (if any)full_description
returns the RegExp used to filter descriptions--warnings
(Jon Rowe)1.8.7
where Time.dup
wouldn'tTime.now
(Jon Rowe)shared_examples_for
context aware, so that keys may be safely reuseddeprecation_stream
(Jon Rowe)Bug fixes
--profile
assubject
still retains the originallyrand
in examples inbacktrace_inclusion_patterns
config option to ensuregems
) still get the normal backtracebefore
hooks so that before
hooks declared inRSpec.configure
run before before
hooks declared in a sharedExample#full_description
so that it gets filled in by the lastExample#description
already did) when nolet
and subject
) leaking define_method
public
method. (Thomas Holmes and Jon Rowe) (#873)Deprecations
Configuration#backtrace_clean_patterns
in favor ofConfiguration#backtrace_exclusion_patterns
for greater consistencybacktrace_inclusion_patterns
config optionConfiguration#requires=
in favor of using ruby'srequire
. Requires specified by the command line can still beConfiguration#require
reader. (Bradley Schaefer)SharedExampleGroups
defined across sibling contexts