Skip to content

Commit

Permalink
Test notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdefreyne committed May 11, 2015
1 parent e53acbb commit 8e34476
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions spec/nanoc/base/views/item_spec.rb
Expand Up @@ -97,11 +97,13 @@
end

describe '#fetch' do
# TODO: test visit start/end notifications

let(:item) { Nanoc::Int::Item.new('stuff', { animal: 'donkey' }, '/foo/') }
let(:view) { described_class.new(item) }

before do
expect(Nanoc::Int::NotificationCenter).to receive(:post).twice
end

context 'with existant key' do
let(:key) { :animal }

Expand Down Expand Up @@ -134,11 +136,13 @@
end

describe '#key?' do
# TODO: test visit start/end notifications

let(:item) { Nanoc::Int::Item.new('stuff', { animal: 'donkey' }, '/foo/') }
let(:view) { described_class.new(item) }

before do
expect(Nanoc::Int::NotificationCenter).to receive(:post).twice
end

subject { view.key?(key) }

context 'with existant key' do
Expand Down

0 comments on commit 8e34476

Please sign in to comment.