cloud9でwebサービスの開発を行っているのですが
うまくテストスイートが実行できずに困っています。
以下、自動テスト実行後の障害ログの内容
05:01:09 - INFO - Running: test/controllers/static_pages_controller_test.rb /home/ubuntu/workspace/db/schema.rb doesn't exist yet. Run `rake db:migrate` to create it, then try again. If you do not intend to use a database, you should instead alter /home/ubuntu/workspace/config/application.rb to limit the frameworks that will be loaded. Started FAIL["test_should_get_home", StaticPagesControllerTest, 2016-10-21 13:51:03 +0000] test_should_get_home#StaticPagesControllerTest (1477057863.83s) <mu-fun> expected but was <Ruby on Rails Tutorial Sample App>.. Expected 0 to be >= 1. test/controllers/static_pages_controller_test.rb:8:in `block in <class:StaticPagesControllerTest>' FAIL["test_should_get_about", StaticPagesControllerTest, 2016-10-21 13:51:03 +0000] test_should_get_about#StaticPagesControllerTest (1477057863.84s) <About | mu-fun> expected but was <About | Ruby on Rails Tutorial Sample App>.. Expected 0 to be >= 1. test/controllers/static_pages_controller_test.rb:20:in `block in <class:StaticPagesControllerTest>' FAIL["test_should_get_support", StaticPagesControllerTest, 2016-10-21 13:51:03 +0000] test_should_get_support#StaticPagesControllerTest (1477057863.86s) <Support | mu-fun> expected but was <Support | Ruby on Rails Tutorial Sample App>.. Expected 0 to be >= 1. test/controllers/static_pages_controller_test.rb:14:in `block in <class:StaticPagesControllerTest>' 3/3: [===================================] 100% Time: 00:00:00, Time: 00:00:00 Finished in 0.32306s 3 tests, 6 assertions, 3 failures, 0 errors, 0 skips
過去に同じ環境でチュートリアルをやっていたので
そのdbの影響が出てるのだと思うのですが
解決方法がわからず手詰まり状態です。
現在、行っているプロジェクトではマイグレートは実行済みですが
うまくチュートリアルのデータとすみわけができてないのでしょうか。
以下、applicationファイルのコードです
require File.expand_path('../boot', __FILE__) require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module Workspace class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. config.time_zone = 'Central Time (Japan)' # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] config.i18n.default_locale = :ja # Do not swallow errors in after_commit/after_rollback callbacks. config.active_record.raise_in_transactional_callbacks = true end end
基本的に日本仕様にしただけでほとんど手を加えていません
ここを変えて何とかなるものでしょうか。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/11/04 06:52
退会済みユーザー
2016/11/04 07:11