From 269cb5439c2a6912346187b2612de6b38345b738 Mon Sep 17 00:00:00 2001 From: Soumya Ranjan Mahunt Date: Wed, 9 Mar 2022 21:16:17 +0530 Subject: [PATCH] test: add app info tests --- .gitignore | 6 +++++- Gemfile.lock | 2 +- Rakefile | 11 +++++++++++ example/ios_app/Gemfile | 2 +- example/ios_app/Gemfile.lock | 4 ++-- spec/info_spec.rb | 7 +++++++ spec/spec_helper.rb | 2 +- 7 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 spec/info_spec.rb diff --git a/.gitignore b/.gitignore index e66465d..c452b03 100644 --- a/.gitignore +++ b/.gitignore @@ -171,4 +171,8 @@ build-iPhoneSimulator/ .rvmrc # Used by RuboCop. Remote config files pulled in from inherit_from directive. -# .rubocop-https?--* \ No newline at end of file +# .rubocop-https?--* + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 8f4a3b9..5ac21ab 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GEM specs: CFPropertyList (3.0.5) rexml - activesupport (6.1.4.6) + activesupport (6.1.4.7) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) diff --git a/Rakefile b/Rakefile index c34b828..175d0da 100644 --- a/Rakefile +++ b/Rakefile @@ -9,5 +9,16 @@ task :specs do sh "bundle exec bacon #{specs('**')}" end +desc 'Setup example project' +task :demo do + system('bundle install', exception: true) + Bundler.with_clean_env do + Dir.chdir('example/ios_app') do |path| + system('bundle install', exception: true) + system('bundle exec pod install', exception: true) + end + end +end + task :default => :specs diff --git a/example/ios_app/Gemfile b/example/ios_app/Gemfile index 9445d2f..56204af 100644 --- a/example/ios_app/Gemfile +++ b/example/ios_app/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' -gem 'cocoapods', '~> 1.11.2' +gem 'cocoapods' gem 'cocoapods-embed-flutter', :path => '../../' diff --git a/example/ios_app/Gemfile.lock b/example/ios_app/Gemfile.lock index f51ee83..41360a2 100644 --- a/example/ios_app/Gemfile.lock +++ b/example/ios_app/Gemfile.lock @@ -11,7 +11,7 @@ GEM specs: CFPropertyList (3.0.5) rexml - activesupport (6.1.4.6) + activesupport (6.1.4.7) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -101,7 +101,7 @@ PLATFORMS universal-darwin-21 DEPENDENCIES - cocoapods (~> 1.11.2) + cocoapods cocoapods-embed-flutter! BUNDLED WITH diff --git a/spec/info_spec.rb b/spec/info_spec.rb new file mode 100644 index 0000000..56be614 --- /dev/null +++ b/spec/info_spec.rb @@ -0,0 +1,7 @@ +require_relative 'spec_helper' + +describe 'Plugin info test' do + it 'checks name' do + CocoapodsEmbedFlutter::NAME.should.equal 'cocoapods-embed-flutter' + end +end \ No newline at end of file diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 35da65d..aeb4605 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -10,7 +10,7 @@ require 'pathname' require 'cocoapods' -Mocha::Configuration.prevent(:stubbing_non_existent_method) +Mocha.configure { |c| c.stubbing_non_existent_method = :prevent } require 'cocoapods_plugin'