spec/distribute_spec.rb in xcjobs-0.0.9 vs spec/distribute_spec.rb in xcjobs-0.1.0

- old
+ new

@@ -198,10 +198,11 @@ t.framework_path = framework_path t.file = file t.api_key = credentials[:api_key] t.build_secret = credentials[:build_secret] t.notifications = true # optional + t.notes = notes end end it 'configures the framework path' do expect(task.framework_path).to eq framework_path @@ -227,12 +228,17 @@ describe 'distribute:crashlytics' do subject { Rake.application['distribute:crashlytics'] } it 'executes the appropriate commands' do subject.invoke - expect(@commands).to eq ["#{File.join(framework_path, 'submit')}", credentials[:api_key], credentials[:build_secret], '-ipaPath', "#{file}"] + expect(@commands).to match ["#{File.join(framework_path, 'submit')}", credentials[:api_key], credentials[:build_secret], '-ipaPath', "#{file}", '-notesPath', an_instance_of(String)] end + + it 'attach specified release notes' do + subject.invoke + expect(IO.read(@commands.last).chomp).to eq notes + end end end end end @@ -311,30 +317,30 @@ end it 'configures the teams' do expect(task.teams).to eq ['12', '23', '42'] end - + it 'configures the users' do expect(task.users).to eq ['1224', '5678'] end - + it 'configures the mandatory' do expect(task.mandatory).to eq 1 end - + it 'configures the commit_sha' do expect(task.commit_sha).to eq '0eb0a329c523bb110b13523d48f19dd612ad77f6' end - + it 'configures the build_server_url' do expect(task.build_server_url).to eq 'http://build-server-url.example.com' end - + it 'configures the repository_url' do expect(task.repository_url).to eq 'https://github.com/kishikawakatsumi/xcjobs' end - + describe 'tasks' do describe 'distribute:hockeyapp' do subject { Rake.application['distribute:hockeyapp'] } it 'executes the appropriate commands' do