|
25 | 25 | instance_variable_get('@load_durable') |
26 | 26 | end |
27 | 27 |
|
28 | | - describe RDF::Durable do |
29 | | - subject {@load_durable.call} |
30 | | - it {should respond_to(:durable?)} |
31 | | - it "should support #durable?" do |
32 | | - expect([true,false]).to be_member(subject.durable?) |
33 | | - end |
| 28 | + subject {@load_durable.call} |
34 | 29 |
|
35 | | - it {should respond_to(:nondurable?)} |
36 | | - it "should support #nondurable?" do |
37 | | - expect([true,false]).to be_member(@load_durable.call.nondurable?) |
38 | | - end |
39 | | - its(:nondurable?) {should_not == subject.durable?} |
| 30 | + it { should respond_to(:durable?) } |
| 31 | + |
| 32 | + it "should support #durable?" do |
| 33 | + expect([true,false]).to be_member(subject.durable?) |
| 34 | + end |
| 35 | + |
| 36 | + it {should respond_to(:nondurable?)} |
| 37 | + |
| 38 | + it "should support #nondurable?" do |
| 39 | + expect([true,false]).to be_member(@load_durable.call.nondurable?) |
| 40 | + end |
40 | 41 |
|
41 | | - it "should save contents between instantiations" do |
42 | | - if subject.durable? |
43 | | - subject.load(RDF::Spec::TRIPLES_FILE) |
44 | | - expect(subject.count).to eq File.readlines(RDF::Spec::TRIPLES_FILE).size |
45 | | - end |
| 42 | + its(:nondurable?) {should_not == subject.durable?} |
| 43 | + |
| 44 | + it "should save contents between instantiations" do |
| 45 | + if subject.durable? |
| 46 | + subject.load(RDF::Spec::TRIPLES_FILE) |
| 47 | + expect(subject.count).to eq File.readlines(RDF::Spec::TRIPLES_FILE).size |
46 | 48 | end |
47 | 49 | end |
48 | 50 | end |
| 51 | + |
| 52 | +## |
| 53 | +# @deprecated use `it_behaves_like "an RDF::Durable"` instead |
| 54 | +module RDF_Durable |
| 55 | + extend RSpec::SharedContext |
| 56 | + include RDF::Spec::Matchers |
| 57 | + |
| 58 | + warn "[DEPRECATION] `RDF_Durable` is deprecated. "\ |
| 59 | + "Please use `it_behaves_like 'an RDF::Durable'`" |
| 60 | + |
| 61 | + describe 'examples for' do |
| 62 | + include_examples 'an RDF::Durable' |
| 63 | + end |
| 64 | +end |
0 commit comments