This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script will setup Evm and Cask on Travis to use for Emacs Lisp testing. | |
# | |
# In .travis.yml, add Evm and Cask to PATH. | |
# | |
# - export PATH="/home/travis/.cask/bin:$PATH" | |
# - export PATH="/home/travis/.evm/bin:$PATH" | |
sudo mkdir /usr/local/evm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script will setup Evm (Emacs Version Manager) and Cask on | |
# Travis to use for Emacs Lisp testing. | |
# | |
# In .travis.yml, add this: | |
# | |
# - curl -fsSkL https://gist.github.com/rejeep/7736123/raw > travis.sh && source ./travis.sh | |
# | |
# Emacs 24.3 is installed in the above script because Cask requires |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails' | |
require 'action_controller/railtie' | |
class TestApp < Rails::Application | |
config.root = File.dirname(__FILE__) | |
config.session_store :cookie_store, key: 'cookie_store_key' | |
config.secret_token = 'secret_token' | |
config.secret_key_base = 'secret_key_base' | |
config.logger = Logger.new($stdout) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class KeyExtractor | |
def self.extract(key_spec, source) | |
new(key_spec.split("."), source).extract | |
end | |
def self.extract_array(key_spec, source) | |
extract(key_spec, source) || [] | |
end | |
def initialize(key_parts, source) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/activerecord/test/cases/adapters/postgresql/hstore_test.rb b/activerecord/test/cases/adapters/postgresql/hstore_test.rb | |
index 6df5d8f..8d1e7bc 100644 | |
--- a/activerecord/test/cases/adapters/postgresql/hstore_test.rb | |
+++ b/activerecord/test/cases/adapters/postgresql/hstore_test.rb | |
@@ -70,6 +70,23 @@ class PostgresqlHstoreTest < ActiveRecord::TestCase | |
Hstore.reset_column_information | |
end | |
+ def test_adding_hstore_column_is_revertable | |
+ hstore_migration = Class.new(ActiveRecord::Migration) do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test "Can't register with a username that has been taken" do | |
create(:user, username: "already-taken") | |
assert_raises(ActiveRecord::RecordNotSaved) do | |
post "/register", username: "already-taken" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UsersController < ApplicationController | |
def show | |
raise ActiveRecord::RecordNotFound | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Failure: | |
RootTest#test_exception_behavior [test/integration/root_test.rb:6]: | |
Expected: 200 | |
Actual: 500 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error: | |
BasicsTest#test_group_weirds_by_from: | |
SyntaxError: /Users/senny/Projects/rails/activemodel/lib/active_model/attribute_methods.rb:387: invalid hex escape | |
... attribute_before_type_cast("\x{A4CA}\x{A4DE}\x{A4A8}", *arg... | |
... ^ | |
/Users/senny/Projects/rails/activemodel/lib/active_model/attribute_methods.rb:387: invalid hex escape | |
...te_before_type_cast("\x{A4CA}\x{A4DE}\x{A4A8}", *args) | |
... ^ | |
/Users/senny/Projects/rails/activemodel/lib/active_model/attribute_methods.rb:387: invalid hex escape | |
...e_type_cast("\x{A4CA}\x{A4DE}\x{A4A8}", *args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler' | |
Bundler.setup(:default) | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' | |
# This connection will do for database-independent bug reports. | |
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') | |
ActiveRecord::Base.logger = Logger.new(STDOUT) |