Sha256: 309818ad49bd6d338aaad527bf54ec2f0a8e871a329d51df10d50a527c65cfd9
Contents?: true
Size: 773 Bytes
Versions: 3
Compression:
Stored size: 773 Bytes
Contents
require_relative "spec_helper" require "lignite" require "fileutils" describe Lignite::DirectCommands do shared_examples "example runner" do |base| let(:example_dir) { File.expand_path("../../examples", __FILE__) } let(:script) { "#{example_dir}/#{base}.rb" } let(:replay_yml) { "#{example_dir}/#{base}.yml" } before(:each) { Lignite::Message.reset_msgid } it "correctly runs #{base}.rb" do allow_any_instance_of(Lignite::DirectCommands).to receive(:sleep) ENV["LIGNITE_REPLAY"] = replay_yml expect { load(script) }.not_to raise_error ENV["LIGNITE_REPLAY"] = nil end end it_behaves_like "example runner", "hello" it_behaves_like "example runner", "lights" it_behaves_like "example runner", "light-sensor" end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
lignite-0.6.0 | spec/direct_commands_spec.rb |
lignite-0.5.0 | spec/direct_commands_spec.rb |
lignite-0.4.0 | spec/direct_commands_spec.rb |