| | 897 | def test_timestamps_creates_updated_at_and_created_at |
|---|
| | 898 | with_new_table do |t| |
|---|
| | 899 | t.expects(:column).with(:created_at, :datetime) |
|---|
| | 900 | t.expects(:column).with(:updated_at, :datetime) |
|---|
| | 901 | t.timestamps |
|---|
| | 902 | end |
|---|
| | 903 | end |
|---|
| | 904 | |
|---|
| | 905 | def test_integer_creates_integer_column |
|---|
| | 906 | with_new_table do |t| |
|---|
| | 907 | t.expects(:column).with(:foo, 'integer', {}) |
|---|
| | 908 | t.expects(:column).with(:bar, 'integer', {}) |
|---|
| | 909 | t.integer :foo, :bar |
|---|
| | 910 | end |
|---|
| | 911 | end |
|---|
| | 912 | |
|---|
| | 913 | def test_string_creates_string_column |
|---|
| | 914 | with_new_table do |t| |
|---|
| | 915 | t.expects(:column).with(:foo, 'string', {}) |
|---|
| | 916 | t.expects(:column).with(:bar, 'string', {}) |
|---|
| | 917 | t.string :foo, :bar |
|---|
| | 918 | end |
|---|
| | 919 | end |
|---|
| | 920 | |
|---|