Hi.
In Ruby there's the `DATA` constant which contains the lines following
the `__END__` keyword in the source file. For some reason RSpec
doesn't see it.
Here's the example:
~~~
# data_spec.rb
requre 'rspec'
describe 'DATA' do
it 'contains lines following the __END__ keyword' do
DATA.re
Thanks for the explanations, Costi G. I didn't thought that the `DATA`
constant isn't seen by the interpreter if it is in the required file.
The only solution that I can think of right now is the following:
~~~
# data_spec.rb
describe 'DATA' do
it 'contains lines following the __END__ keyword'
Hi.
Why doesn't the following filter work?
~~~
# encoding: utf-8
# ./example_spec.rb
RSpec.configure do |config|
config.filter = {
unless: :condition_acceptable
}
end
describe 'some code' do
it 'does one', if: :condition_acceptable do
end
it 'does two', unless: :condition_accepta
end
it 'does two' do
end
end
~~~
* The RSpec Book, chp. 16, p. 238.
On 14 мар, 03:16, Myron Marston wrote:
> On Mar 11, 1:17 pm, Justin Ko wrote:
>
>
>
> > On Thu, Mar 10, 2011 at 2:32 AM, Shamaoke wrote:
> > > Hi.
>
> > > Wh
Hi.
When I try to inspect example metadata, for some reason it raises the
encoding compatibility exception.
~~~
describe RSpec::Core::Metadata do
describe '#inspect' do
it 'raises Encoding::CompatibilityError' do
expect {
example.metadata.inspect
}.to raise_error(Encodin
I installed Ruby 1.9.2-p180 from the sources. Unfortunatelly, the bug
still exists:
http://dl.dropbox.com/u/20481401/compatability_error.png
On 7 апр, 09:04, Justin Ko wrote:
> On Wed, Apr 6, 2011 at 12:53 AM, Shamaoke wrote:
> > Hi.
>
> > When I try to inspect example
/
my_application/spec` will not.
On 9 апр, 18:14, Shamaoke wrote:
> I installed Ruby 1.9.2-p180 from the sources. Unfortunatelly, the bug
> still exists:
>
> http://dl.dropbox.com/u/20481401/compatability_error.png
>
> On 7 апр, 09:04, Justin Ko wrote:
>
>
>
>
>
>