')
+ });
+
+ datashift_audio_engine.visual.playlist.children('li').on('click', function(){
+ datashift_audio_engine.audio_data.track = parseInt(this.id.split('-')[1]);
+ datashift_audio_engine.settings.autoplay = true;
+ datashift_audio_engine.render_wave_from_audio_file()
+ });
+
+ if (fromBeginning == true){
+ datashift_audio_engine.audio_data.track = -1;
+ datashift_audio_engine.next();
+ } else {
+ datashift_audio_engine.audio_data.track = datashift_audio_engine.playlist.length;
+ datashift_audio_engine.previous();
+ }
+ }).fail(function(){
+ console.error('page not found');
+ console.log('page: ' + datashift_audio_engine.audio_data.page)
+ });
+ },
+
+ volume: function(value){
+ if (isNaN(value)) value = 1;
+
+ this.settings.volume = value;
+
+ if (this.is_radio == true){
+ this.engine.volume = value;
+ } else {
+ this.engine.setVolume(value);
+ window.localStorage.setItem('volume', value);
+ }
+ },
+
+ seek: function(position){
+ this.engine.setCurrentTime(position);
+ this.audio_data.position = position;
+ this.save_current_state();
+ },
+
+ // Save current state of a player and send it to the back-end to sync it
+ save_current_state: function(save_url){
+ console.log('save_current_state - URL:');
+ console.log(datashift_audio_engine.routes.save_url);
+ if ( save_url === undefined && (datashift_audio_engine.routes.save_url == null || datashift_audio_engine.routes.save_url === undefined) ) return;
+
+ if ( datashift_audio_engine.state === undefined ) return;
+
+ if ( save_url === undefined) save_url = datashift_audio_engine.routes.save_url;
+
+ datashift_audio_engine.update_info();
+
+ datashift_audio_engine.visual.current_position.html(formatTime(datashift_audio_engine.audio_data.position));
+
+ var data = {
+ user_token: datashift_audio_engine.user_token,
+ client_token: datashift_audio_engine.client_token,
+ random: datashift_audio_engine.settings.random,
+ audio_data: datashift_audio_engine.audio_data,
+ }
+
+ $.post(save_url, data )
+ .done(function(){
+ console.log('saved');
+ })
+ .fail(function(){
+ console.log('fail to save');
+ });
+ }
+};
+
+function formatTime(time_in_seconds){
+ var seconds = Math.floor(time_in_seconds);
+ var minutes = Math.floor(seconds / 60);
+
+ minutes = (minutes >= 10) ? minutes : "0" + minutes;
+
+ seconds = Math.floor(seconds % 60);
+ seconds = (seconds >= 10) ? seconds : "0" + seconds;
+
+ return minutes + ":" + seconds;
+}
diff --git a/app/helpers/datashift_audio_engine/application_helper.rb b/app/helpers/datashift_audio_engine/application_helper.rb
index bf7e03c..2d2f216 100644
--- a/app/helpers/datashift_audio_engine/application_helper.rb
+++ b/app/helpers/datashift_audio_engine/application_helper.rb
@@ -17,5 +17,9 @@ def datashift_audio_player_in_navbar(init_url: nil, load_url: nil)
render partial: 'datashift_audio_engine/shared/player_in_navbar', locals: { init_url: init_url, load_url: load_url }
end
+ def test
+ 'test'
+ end
+
end
end
diff --git a/datashift_audio_engine.gemspec b/datashift_audio_engine.gemspec
index 8538657..9fdc8c6 100755
--- a/datashift_audio_engine.gemspec
+++ b/datashift_audio_engine.gemspec
@@ -17,6 +17,13 @@ Gem::Specification.new do |s|
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]
s.add_dependency "rails", "~> 5.2"
+ s.add_development_dependency "rspec"
+ s.add_development_dependency 'rubocop'
+ s.add_development_dependency 'factory_bot_rails', '~> 4.8', '>= 4.8.2'
+
+ s.add_development_dependency "teaspoon-jasmine"
+ s.add_development_dependency "poltergeist"
+ s.add_development_dependency "coveralls"
s.add_development_dependency "sqlite3"
end
diff --git a/lib/datashift_audio_engine/engine.rb b/lib/datashift_audio_engine/engine.rb
index 6008988..f4f46a9 100755
--- a/lib/datashift_audio_engine/engine.rb
+++ b/lib/datashift_audio_engine/engine.rb
@@ -9,5 +9,13 @@ class Engine < ::Rails::Engine
config.assets.paths << root.join("vendor", "assets", "javascripts")
config.assets.precompile += %w[*.png]
+
+ config.generators do |g|
+ g.test_framework :rspec, :fixture => false
+ g.fixture_replacement :factory_girl, :dir => 'spec/factories'
+
+ g.assets false
+ g.helper false
+ end
end
end
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
new file mode 100644
index 0000000..e5e749b
--- /dev/null
+++ b/spec/helpers/application_helper_spec.rb
@@ -0,0 +1,13 @@
+require 'rails_helper'
+
+RSpec.describe DatashiftAudioEngine::ApplicationHelper, :type => :helper do
+
+ context "test" do
+
+ it "test" do
+ expect(helper.test).to eq("test")
+ end
+
+ end
+
+end
\ No newline at end of file
diff --git a/spec/javascripts/application_spec.js b/spec/javascripts/application_spec.js
new file mode 100644
index 0000000..15a5db6
--- /dev/null
+++ b/spec/javascripts/application_spec.js
@@ -0,0 +1,89 @@
+//= require audio_engine
+
+describe("When the library in loaded", function() {
+ it("should have nullified basic variables", function() {
+ expect(jQuery).toBeDefined();
+ expect(datashift_audio_engine).toBeDefined();
+ });
+
+ it("should have nullified basic properties of datashift audio engine", function() {
+ expect(datashift_audio_engine.state).toBe(null);
+ expect(datashift_audio_engine.engine).toBe(null);
+
+ expect(datashift_audio_engine.save_interval).toBe(1000);
+ expect(datashift_audio_engine.is_radio).toBe(false);
+
+ expect(datashift_audio_engine.routes.init_url).toBe(null);
+ expect(datashift_audio_engine.routes.load_url).toBe(null);
+ expect(datashift_audio_engine.routes.save_url).toBe(null);
+ expect(datashift_audio_engine.routes.load_url).toBe(null);
+
+ expect(datashift_audio_engine.settings.autoplay).toBe(false);
+ expect(datashift_audio_engine.settings.random).toBe(false);
+ expect(datashift_audio_engine.settings.repeat).toBe(null);
+ expect(datashift_audio_engine.settings.volume).toBe(1);
+
+ expect(datashift_audio_engine.user_token).toBe(null);
+ expect(datashift_audio_engine.client_token).toBe(null);
+
+ expect(datashift_audio_engine.playlist_id).toBe(0);
+ expect(datashift_audio_engine.timer).toBe(null);
+ });
+
+ it("should be avaliabled support function foratTime and work fine", function(){
+ expect(formatTime).toBeDefined();
+
+ var time_in_seconds = 144;
+ var time_in_cute_form = '02:24';
+ expect(formatTime(time_in_seconds)).toEqual(time_in_cute_form);
+ });
+});
+
+describe("When the library is settings are OK", function(){
+ // save current state
+ it('save current state', function(){
+ //init
+ //load
+ //render
+ // datashift_audio_engine.save_current_state();
+ });
+
+ // init
+ it('should be initialized by data that obtained through ajax request', function(){
+ datashift_audio_engine.init('/init');
+ expect(datashift_audio_engine.state).toBe('sent init request');
+ });
+
+ it('should be inited without ajax request to server' ,function() {
+ var spy_on_init = spyOn(datashift_audio_engine, 'init');
+ var spy_on_ajax_init = spyOn($, 'ajax');
+
+ datashift_audio_engine.init();
+
+ expect(spy_on_init).toHaveBeenCalled();
+ expect(spy_on_ajax_init).not.toHaveBeenCalled()
+ });
+
+ // load
+ it('should load test data from list', function(){
+ datashift_audio_engine.init();
+
+ all_elements = $('
\
+ \
+
\
+ ');
+ $(document.body).append(all_elements);
+
+ datashift_audio_engine.load();
+ expect(datashift_audio_engine.state).toBe('sent load request');
+ });
+
+ // update info
+ it('update info', function(){
+ datashift_audio_engine.init();
+ var spy_on_update_info = spyOn(datashift_audio_engine, 'update_info');
+ // datashift_audio_engine.load();
+ datashift_audio_engine.update_info();
+ expect(spy_on_update_info).toHaveBeenCalled();
+ });
+});
\ No newline at end of file
diff --git a/spec/javascripts/spec_helper.js b/spec/javascripts/spec_helper.js
new file mode 100644
index 0000000..ef6c800
--- /dev/null
+++ b/spec/javascripts/spec_helper.js
@@ -0,0 +1,36 @@
+// Teaspoon includes some support files, but you can use anything from your own support path too.
+// require support/jasmine-jquery-1.7.0
+// require support/jasmine-jquery-2.0.0
+// require support/jasmine-jquery-2.1.0
+// require support/sinon
+// require support/your-support-file
+//
+// PhantomJS (Teaspoons default driver) doesn't have support for Function.prototype.bind, which has caused confusion.
+// Use this polyfill to avoid the confusion.
+//= require support/phantomjs-shims
+//
+// You can require your own javascript files here. By default this will include everything in application, however you
+// may get better load performance if you require the specific files that are being used in the spec that tests them.
+//= require jquery
+//= require jquery_ujs
+//= require application
+//
+// Deferring execution
+// If you're using CommonJS, RequireJS or some other asynchronous library you can defer execution. Call
+// Teaspoon.execute() after everything has been loaded. Simple example of a timeout:
+//
+// Teaspoon.defer = true
+// setTimeout(Teaspoon.execute, 1000)
+//
+// Matching files
+// By default Teaspoon will look for files that match _spec.{js,js.coffee,.coffee}. Add a filename_spec.js file in your
+// spec path and it'll be included in the default suite automatically. If you want to customize suites, check out the
+// configuration in teaspoon_env.rb
+//
+// Manifest
+// If you'd rather require your spec files manually (to control order for instance) you can disable the suite matcher in
+// the configuration and use this file as a manifest.
+//
+// For more information: http://github.com/modeset/teaspoon
+
+
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
new file mode 100644
index 0000000..956c8e9
--- /dev/null
+++ b/spec/rails_helper.rb
@@ -0,0 +1,63 @@
+# This file is copied to spec/ when you run 'rails generate rspec:install'
+require 'spec_helper'
+ENV['RAILS_ENV'] ||= 'test'
+require File.expand_path('../../config/environment', __FILE__)
+# Prevent database truncation if the environment is production
+abort("The Rails environment is running in production mode!") if Rails.env.production?
+require 'rspec/rails'
+# Add additional requires below this line. Rails is not loaded until this point!
+
+# Requires supporting ruby files with custom matchers and macros, etc, in
+# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
+# run as spec files by default. This means that files in spec/support that end
+# in _spec.rb will both be required and run as specs, causing the specs to be
+# run twice. It is recommended that you do not name files matching this glob to
+# end with _spec.rb. You can configure this pattern with the --pattern
+# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
+#
+# The following line is provided for convenience purposes. It has the downside
+# of increasing the boot-up time by auto-requiring all files in the support
+# directory. Alternatively, in the individual `*_spec.rb` files, manually
+# require only the support files necessary.
+#
+# Dir[Rails.root.join('spec', 'support', '**', '*.rb')].each { |f| require f }
+
+# Checks for pending migrations and applies them before tests are run.
+# If you are not using ActiveRecord, you can remove these lines.
+begin
+ ActiveRecord::Migration.maintain_test_schema!
+rescue ActiveRecord::PendingMigrationError => e
+ puts e.to_s.strip
+ exit 1
+end
+RSpec.configure do |config|
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
+
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
+ # examples within a transaction, remove the following line or assign false
+ # instead of true.
+ config.use_transactional_fixtures = true
+ config.infer_base_class_for_anonymous_controllers = false
+ config.order = :random
+
+ # RSpec Rails can automatically mix in different behaviours to your tests
+ # based on their file location, for example enabling you to call `get` and
+ # `post` in specs under `spec/controllers`.
+ #
+ # You can disable this behaviour by removing the line below, and instead
+ # explicitly tag your specs with their type, e.g.:
+ #
+ # RSpec.describe UsersController, :type => :controller do
+ # # ...
+ # end
+ #
+ # The different available types are documented in the features, such as in
+ # https://relishapp.com/rspec/rspec-rails/docs
+ config.infer_spec_type_from_file_location!
+
+ # Filter lines from Rails gems in backtraces.
+ config.filter_rails_from_backtrace!
+ # arbitrary gems may also be filtered via:
+ # config.filter_gems_from_backtrace("gem name")
+end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
new file mode 100644
index 0000000..ce33d66
--- /dev/null
+++ b/spec/spec_helper.rb
@@ -0,0 +1,96 @@
+# This file was generated by the `rails generate rspec:install` command. Conventionally, all
+# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
+# The generated `.rspec` file contains `--require spec_helper` which will cause
+# this file to always be loaded, without a need to explicitly require it in any
+# files.
+#
+# Given that it is always loaded, you are encouraged to keep this file as
+# light-weight as possible. Requiring heavyweight dependencies from this file
+# will add to the boot time of your test suite on EVERY test run, even for an
+# individual file that may not need all of that loaded. Instead, consider making
+# a separate helper file that requires the additional dependencies and performs
+# the additional setup, and require it from the spec files that actually need
+# it.
+#
+# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
+RSpec.configure do |config|
+ # rspec-expectations config goes here. You can use an alternate
+ # assertion/expectation library such as wrong or the stdlib/minitest
+ # assertions if you prefer.
+ config.expect_with :rspec do |expectations|
+ # This option will default to `true` in RSpec 4. It makes the `description`
+ # and `failure_message` of custom matchers include text for helper methods
+ # defined using `chain`, e.g.:
+ # be_bigger_than(2).and_smaller_than(4).description
+ # # => "be bigger than 2 and smaller than 4"
+ # ...rather than:
+ # # => "be bigger than 2"
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
+ end
+
+ # rspec-mocks config goes here. You can use an alternate test double
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
+ config.mock_with :rspec do |mocks|
+ # Prevents you from mocking or stubbing a method that does not exist on
+ # a real object. This is generally recommended, and will default to
+ # `true` in RSpec 4.
+ mocks.verify_partial_doubles = true
+ end
+
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
+ # have no way to turn it off -- the option exists only for backwards
+ # compatibility in RSpec 3). It causes shared context metadata to be
+ # inherited by the metadata hash of host groups and examples, rather than
+ # triggering implicit auto-inclusion in groups with matching metadata.
+ config.shared_context_metadata_behavior = :apply_to_host_groups
+
+# The settings below are suggested to provide a good initial experience
+# with RSpec, but feel free to customize to your heart's content.
+=begin
+ # This allows you to limit a spec run to individual examples or groups
+ # you care about by tagging them with `:focus` metadata. When nothing
+ # is tagged with `:focus`, all examples get run. RSpec also provides
+ # aliases for `it`, `describe`, and `context` that include `:focus`
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
+ config.filter_run_when_matching :focus
+
+ # Allows RSpec to persist some state between runs in order to support
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
+ # you configure your source control system to ignore this file.
+ config.example_status_persistence_file_path = "spec/examples.txt"
+
+ # Limits the available syntax to the non-monkey patched syntax that is
+ # recommended. For more details, see:
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
+ config.disable_monkey_patching!
+
+ # Many RSpec users commonly either run the entire suite or an individual
+ # file, and it's useful to allow more verbose output when running an
+ # individual spec file.
+ if config.files_to_run.one?
+ # Use the documentation formatter for detailed output,
+ # unless a formatter has already been configured
+ # (e.g. via a command-line flag).
+ config.default_formatter = "doc"
+ end
+
+ # Print the 10 slowest examples and example groups at the
+ # end of the spec run, to help surface which specs are running
+ # particularly slow.
+ config.profile_examples = 10
+
+ # Run specs in random order to surface order dependencies. If you find an
+ # order dependency and want to debug it, you can fix the order by providing
+ # the seed, which is printed after each run.
+ # --seed 1234
+ config.order = :random
+
+ # Seed global randomization in this process using the `--seed` CLI option.
+ # Setting this allows you to use `--seed` to deterministically reproduce
+ # test failures related to randomization by passing the same `--seed` value
+ # as the one that triggered the failure.
+ Kernel.srand config.seed
+=end
+end
diff --git a/spec/teaspoon_env.rb b/spec/teaspoon_env.rb
new file mode 100644
index 0000000..1fc5ab9
--- /dev/null
+++ b/spec/teaspoon_env.rb
@@ -0,0 +1,186 @@
+Teaspoon.configure do |config|
+ # Determines where the Teaspoon routes will be mounted. Changing this to "/jasmine" would allow you to browse to
+ # `http://localhost:3000/jasmine` to run your tests.
+ config.mount_at = "/teaspoon"
+
+ # Specifies the root where Teaspoon will look for files. If you're testing an engine using a dummy application it can
+ # be useful to set this to your engines root (e.g. `Teaspoon::Engine.root`).
+ # Note: Defaults to `Rails.root` if nil.
+ config.root = '/home/user/projects/datashift_audio_engine/'
+
+ # Paths that will be appended to the Rails assets paths
+ # Note: Relative to `config.root`.
+ config.asset_paths = ["spec/javascripts", "spec/javascripts/stylesheets"]
+
+ # Fixtures are rendered through a controller, which allows using HAML, RABL/JBuilder, etc. Files in these paths will
+ # be rendered as fixtures.
+ config.fixture_paths = ["spec/javascripts/fixtures"]
+
+ # SUITES
+ #
+ # You can modify the default suite configuration and create new suites here. Suites are isolated from one another.
+ #
+ # When defining a suite you can provide a name and a block. If the name is left blank, :default is assumed. You can
+ # omit various directives and the ones defined in the default suite will be used.
+ #
+ # To run a specific suite
+ # - in the browser: http://localhost/teaspoon/[suite_name]
+ # - with the rake task: rake teaspoon suite=[suite_name]
+ # - with the cli: teaspoon --suite=[suite_name]
+ config.suite do |suite|
+ # Specify the framework you would like to use. This allows you to select versions, and will do some basic setup for
+ # you -- which you can override with the directives below. This should be specified first, as it can override other
+ # directives.
+ # Note: If no version is specified, the latest is assumed.
+ #
+ # Versions: 1.3.1, 2.0.3, 2.1.3, 2.2.0, 2.2.1, 2.3.4
+ suite.use_framework :jasmine, "2.3.4"
+
+ # Specify a file matcher as a regular expression and all matching files will be loaded when the suite is run. These
+ # files need to be within an asset path. You can add asset paths using the `config.asset_paths`.
+ suite.matcher = "{spec/javascripts,app/assets}/**/*_spec.{js,js.coffee,coffee}"
+
+ # Load additional JS files, but requiring them in your spec helper is the preferred way to do this.
+ #suite.javascripts = []
+
+ # You can include your own stylesheets if you want to change how Teaspoon looks.
+ # Note: Spec related CSS can and should be loaded using fixtures.
+ #suite.stylesheets = ["teaspoon"]
+
+ # This suites spec helper, which can require additional support files. This file is loaded before any of your test
+ # files are loaded.
+ suite.helper = "spec_helper"
+
+ # Partial to be rendered in the head tag of the runner. You can use the provided ones or define your own by creating
+ # a `_boot.html.erb` in your fixtures path, and adjust the config to `"/boot"` for instance.
+ #
+ # Available: boot, boot_require_js
+ suite.boot_partial = "boot"
+
+ # Partial to be rendered in the body tag of the runner. You can define your own to create a custom body structure.
+ suite.body_partial = "body"
+
+ # Hooks allow you to use `Teaspoon.hook("fixtures")` before, after, or during your spec run. This will make a
+ # synchronous Ajax request to the server that will call all of the blocks you've defined for that hook name.
+ #suite.hook :fixtures, &proc{}
+
+ # Determine whether specs loaded into the test harness should be embedded as individual script tags or concatenated
+ # into a single file. Similar to Rails' asset `debug: true` and `config.assets.debug = true` options. By default,
+ # Teaspoon expands all assets to provide more valuable stack traces that reference individual source files.
+ #suite.expand_assets = true
+
+ # Non-.js file extensions Teaspoon should consider JavaScript files
+ #suite.js_extensions = [/(\.js)?.coffee/, /(\.js)?.es6/, ".es6.js"]
+ end
+
+ # Example suite. Since we're just filtering to files already within the root test/javascripts, these files will also
+ # be run in the default suite -- but can be focused into a more specific suite.
+ #config.suite :targeted do |suite|
+ # suite.matcher = "spec/javascripts/targeted/*_spec.{js,js.coffee,coffee}"
+ #end
+
+ # CONSOLE RUNNER SPECIFIC
+ #
+ # These configuration directives are applicable only when running via the rake task or command line interface. These
+ # directives can be overridden using the command line interface arguments or with ENV variables when using the rake
+ # task.
+ #
+ # Command Line Interface:
+ # teaspoon --driver=phantomjs --server-port=31337 --fail-fast=true --format=junit --suite=my_suite /spec/file_spec.js
+ #
+ # Rake:
+ # teaspoon DRIVER=phantomjs SERVER_PORT=31337 FAIL_FAST=true FORMATTERS=junit suite=my_suite
+
+ # Specify which headless driver to use. Supports PhantomJS, Selenium Webdriver and BrowserStack Webdriver.
+ #
+ # Available: :phantomjs, :selenium, :browserstack, :capybara_webkit
+ # PhantomJS: https://github.com/modeset/teaspoon/wiki/Using-PhantomJS
+ # Selenium Webdriver: https://github.com/modeset/teaspoon/wiki/Using-Selenium-WebDriver
+ # BrowserStack Webdriver: https://github.com/modeset/teaspoon/wiki/Using-BrowserStack-WebDriver
+ # Capybara Webkit: https://github.com/modeset/teaspoon/wiki/Using-Capybara-Webkit
+ config.driver = :phantomjs
+
+ # Specify additional options for the driver.
+ #
+ # PhantomJS: https://github.com/modeset/teaspoon/wiki/Using-PhantomJS
+ # Selenium Webdriver: https://github.com/modeset/teaspoon/wiki/Using-Selenium-WebDriver
+ # BrowserStack Webdriver: https://github.com/modeset/teaspoon/wiki/Using-BrowserStack-WebDriver
+ # Capybara Webkit: https://github.com/modeset/teaspoon/wiki/Using-Capybara-Webkit
+ #config.driver_options = nil
+
+ # Specify the timeout for the driver. Specs are expected to complete within this time frame or the run will be
+ # considered a failure. This is to avoid issues that can arise where tests stall.
+ #config.driver_timeout = 180
+
+ # Specify a server to use with Rack (e.g. thin, mongrel). If nil is provided Rack::Server is used.
+ #config.server = nil
+
+ # Specify a host to run on a specific host, otherwise Teaspoon will use 127.0.0.1.
+ #config.server_host = nil
+
+ # Specify a port to run on a specific port, otherwise Teaspoon will use a random available port.
+ config.server_port = 31337
+
+ # Timeout for starting the server in seconds. If your server is slow to start you may have to bump this, or you may
+ # want to lower this if you know it shouldn't take long to start.
+ #config.server_timeout = 20
+
+ # Force Teaspoon to fail immediately after a failing suite. Can be useful to make Teaspoon fail early if you have
+ # several suites, but in environments like CI this may not be desirable.
+ #config.fail_fast = true
+
+ # Specify the formatters to use when outputting the results.
+ # Note: Output files can be specified by using `"junit>/path/to/output.xml"`.
+ #
+ # Available: :dot, :clean, :documentation, :json, :junit, :pride, :rspec_html, :snowday, :swayze_or_oprah, :tap, :tap_y, :teamcity
+ #config.formatters = [:dot]
+
+ # Specify if you want color output from the formatters.
+ config.color = true
+
+ # Teaspoon pipes all console[log/debug/error] to $stdout. This is useful to catch places where you've forgotten to
+ # remove them, but in verbose applications this may not be desirable.
+ #config.suppress_log = false
+
+ # COVERAGE REPORTS / THRESHOLD ASSERTIONS
+ #
+ # Coverage reports requires Istanbul (https://github.com/gotwarlost/istanbul) to add instrumentation to your code and
+ # display coverage statistics.
+ #
+ # Coverage configurations are similar to suites. You can define several, and use different ones under different
+ # conditions.
+ #
+ # To run with a specific coverage configuration
+ # - with the rake task: rake teaspoon USE_COVERAGE=[coverage_name]
+ # - with the cli: teaspoon --coverage=[coverage_name]
+
+ # Specify that you always want a coverage configuration to be used. Otherwise, specify that you want coverage
+ # on the CLI.
+ # Set this to "true" or the name of your coverage config.
+ #config.use_coverage = nil
+
+ # You can have multiple coverage configs by passing a name to config.coverage.
+ # e.g. config.coverage :ci do |coverage|
+ # The default coverage config name is :default.
+ config.coverage do |coverage|
+ # Which coverage reports Istanbul should generate. Correlates directly to what Istanbul supports.
+ #
+ # Available: text-summary, text, html, lcov, lcovonly, cobertura, teamcity
+ #coverage.reports = ["text-summary", "html"]
+
+ # The path that the coverage should be written to - when there's an artifact to write to disk.
+ # Note: Relative to `config.root`.
+ #coverage.output_path = "coverage"
+
+ # Assets to be ignored when generating coverage reports. Accepts an array of filenames or regular expressions. The
+ # default excludes assets from vendor, gems and support libraries.
+ #coverage.ignore = [%r{/lib/ruby/gems/}, %r{/vendor/assets/}, %r{/support/}, %r{/(.+)_helper.}]
+
+ # Various thresholds requirements can be defined, and those thresholds will be checked at the end of a run. If any
+ # aren't met the run will fail with a message. Thresholds can be defined as a percentage (0-100), or nil.
+ #coverage.statements = nil
+ #coverage.functions = nil
+ #coverage.branches = nil
+ #coverage.lines = nil
+ end
+end
diff --git a/test/integration/navigation_test.rb b/test/integration/navigation_test.rb
index 29e59d8..f7cd1b7 100755
--- a/test/integration/navigation_test.rb
+++ b/test/integration/navigation_test.rb
@@ -1,7 +1,7 @@
require 'test_helper'
class NavigationTest < ActionDispatch::IntegrationTest
- # test "the truth" do
- # assert true
- # end
+ test "the truth" do
+ assert true
+ end
end