Sha256: 9ef811bace49321781cc7575e0ab3ea07c49ff3c01f584b6116c0b6a9dd54957
Contents?: true
Size: 779 Bytes
Versions: 19
Compression:
Stored size: 779 Bytes
Contents
require 'guard/compat/test/template' require 'guard/compat/example' RSpec.describe Guard::MyPlugin do describe 'template' do subject { Guard::Compat::Test::Template.new(described_class) } # Stub the template, because we are testing the helper, not the plugin let(:template_contents) do <<-EOS guard :myplugin do watch(/(foo).rb/) { |m| "spec/\#{m[1]}_spec.rb" } watch(/bar.rb/) end EOS end before do allow(IO).to receive(:read) .with('lib/guard/myplugin/templates/Guardfile') .and_return(template_contents) end it 'translates changes' do expect(subject.changed('foo.rb')).to eq(['spec/foo_spec.rb']) expect(subject.changed('bar.rb')).to eq(['bar.rb']) end end end
Version data entries
19 entries across 19 versions & 9 rubygems