Sha256: f111ad58a9a3ed013e39d5ac70618cb439b9d9c872c76453a3ad99f7218858d5
Contents?: true
Size: 1.26 KB
Versions: 1
Compression:
Stored size: 1.26 KB
Contents
module Omnitest class Psychic module Factories RSpec.describe JavaFactory do let(:psychic) { Psychic.new(cwd: current_dir) } let(:shell) { Omnitest::Shell.shell = double('shell') } subject { described_class.new(psychic, cwd: current_dir) } before(:each) do write_file('src/main/java/HelloWorld.java', '') write_file('src/main/java/org/mycompany/FQ.java', '') write_file('src/test/java/org/mycompany/FQTest.java', '') end describe '#script' do let(:hello_world) { psychic.script('hello world') } let(:fq) { psychic.script('fq') } let(:fqtest) { psychic.script('fqtest') } it 'converts files without a package to a classname only' do expect(subject.script hello_world).to eq('java -classpath build/libs/* HelloWorld') end it 'converts files with a package to a fully qualified name' do expect(subject.script fq).to eq('java -classpath build/libs/* org.mycompany.FQ') end it 'converts files with a package to a fully qualified name' do expect(subject.script fqtest).to eq('java -classpath build/libs/* org.mycompany.FQTest') end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
omnitest-psychic-0.0.9 | spec/omnitest/psychic/factories/java_factories_spec.rb |