Sha256: e4342863962b2a3e3723cac8f67943ffb7717a6224720029af414412310c0bca
Contents?: true
Size: 739 Bytes
Versions: 1
Compression:
Stored size: 739 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 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lignite-0.3.0 | spec/direct_commands_spec.rb |