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
# In the file spec/controllers/servers_controller_spec.rb | |
... | |
... | |
describe "POST create" do | |
describe "failure" do | |
it "should re-render server page" do | |
post :create, :server => @server | |
response.should render_template(:show) | |
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
SELECT name,age | |
FROM person | |
join (SELECT max(age) as age FROM person) as max_age USING (age); |
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
$ rvm list | |
rvm rubies | |
ruby-1.8.7-p302 [ i386 ] | |
=> ruby-1.9.2-p0 [ i386 ] | |
$ rvm update | |
rvm 1.0.0 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/] |
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 | |
| |-- git | |
| |-- git-cvsserver | |
| |-- gitk | |
| |-- git-receive-pack | |
| |-- git-shell | |
| |-- git-upload-archive | |
| |-- git-upload-pack | |
| `-- stg |
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
{ | |
"Image": { | |
"Width": 800, | |
"Height": 600, | |
"Title": "View from 15th Floor", | |
"Thumbnail": { | |
"Url": "http://www.example.com/image/481989943", | |
"Height": 125, | |
"Width": "100" | |
}, |
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
[... cut ...] | |
==> elixir (exunit) | |
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F... | |
1) test_pwd (SystemTest) | |
** (ExUnit.AssertionError) Expected '/media/fdc918b8-8a3f-4a63-bfc1-e4155da45514/guedes/guedes/programas/Erlang/elixir' to be equal to '/home/guedes/guedes/programas/Erlang/elixir' | |
stacktrace: | |
/media/fdc918b8-8a3f-4a63-bfc1-e4155da45514/guedes/guedes/programas/Erlang/elixir/test/elixir/system_test.exs:36: SystemTest.test_pwd/0 | |
/media/fdc918b8-8a3f-4a63-bfc1-e4155da45514/guedes/guedes/programas/Erlang/elixir/lib/ex_unit/runner.ex:78: ExUnit.Runner.run_test/3 | |
/media/fdc918b8 |
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
guedes@betelgeuse:/media/fdc918b8-8a3f-4a63-bfc1-e4155da45514/guedes/guedes/programas/Erlang/exjson$ ../exdoc/bin/exdoc -pa exbin | |
** (UndefinedFunctionError) undefined function: JSON.__info__/1 | |
JSON.__info__(:moduledoc) | |
/media/fdc918b8-8a3f-4a63-bfc1-e4155da45514/guedes/guedes/programas/Erlang/exdoc/lib/exdoc/retriever.ex:12: ExDoc.Retriever.get_docs_from_file/2 | |
/media/fdc918b8-8a3f-4a63-bfc1-e4155da45514/guedes/guedes/programas/Erlang/elixir/lib/enum.ex:374: Enum."-map/2-lc$^0/1-0-"/2 | |
/media/fdc918b8-8a3f-4a63-bfc1-e4155da45514/guedes/guedes/programas/Erlang/exdoc/lib/exdoc.ex:5: ExDoc.generate_docs/3 | |
src/elixir_compiler.erl:76: :elixir_compiler."-code_loading_compilation/5-fun-0-"/4 | |
src/elixir_compiler.erl:75: :elixir_compiler.code_loading_compilation/5 | |
src/elixir_compiler.erl:29: :elixir_compiler.string/2 | |
/media/fdc918b8-8a3f-4a63-bfc1-e4155da45514/guedes/guedes/programas/Erlang/elixir/lib/code.ex:94: Code.require_file/2 |
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
import Elixir.Builtin, except: ["+": 2] | |
defmodule DateUtils do | |
def :+.(left, right) when is_tuple(left) do | |
seconds = Erlang.calendar.datetime_to_gregorian_seconds(left) | |
result = seconds + right | |
Erlang.calendar.gregorian_seconds_to_datetime(result) | |
end | |
# is this correct ? |
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
guedes@dba01:/disco/programas/exdate$ make clean test | |
rm -rf ebin | |
Compiling Elixir code ... | |
elixirc lib/*/*/*.ex lib/*/*.ex lib/*.ex -o ebin --docs | |
Compiled lib/date.ex | |
Running tests ... | |
time elixir -pa ebin -r "test/**/*_test.exs" | |
F.F... |
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
Running tests ... | |
time elixir -pa ebin -r "test/**/*_test.exs" | |
......F.... | |
1) test_date_to_timestamp_with_chars (DateTest) | |
** (ExUnit.AssertionError) Expected "2000-01-01 23:59:59" to be equal to (==) "200045014501322358595859" | |
stacktrace: | |
/disco/programas/exdate/test/date_test.exs:107: DateTest.test_date_to_timestamp_with_chars/0 | |
/disco/programas/elixir/lib/ex_unit/runner.ex:78: ExUnit.Runner.run_test/3 | |
/disco/programas/elixir/lib/enum.ex:619: Enum.do_each/3 |
OlderNewer