Git Product home page Git Product logo

espec's People

Contributors

benmmurphy avatar lucaspiller avatar pusewicz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

espec's Issues

rethink parse_transform

i don't think we actually need the parse transform. i think we can have the same syntax and use the imported function feature.

Syntax doesn't play nicely with vimerl

Possible related to the first answer mentioned on jimenezrick/vimerl#7

Auto indenting ends up with:

spec() ->
  describe("beforespec", fun() ->
        it("should do stuff", fun() ->
              io:format("output from: it should do stuff~n", [])
          end),
    end).

It should be:

spec() ->
    describe("beforespec", fun() ->
        it("should do stuff", fun() ->
            io:format("output from: it should do stuff~n", [])
        end),
    end).

instance variable support

rspec like instance variables

we should be able to support

Foo@ = setup_variable()

do_stuff_with(Foo@)

is that syntax too weird?

not sure exactly how this should work with before/after each/all

alternative 1)

each group/example creates its own variable context which is a copy of the outer variable context. this means examples/groups on the same level won't interfere with each other. but it also means an after_all in a group will only see variables set by a before_all in the same group or an outer group which limits what an after_all can clean up. i think that makes sense.

alternative 2)

do whatever rspec does...

nicer mech integration

we should have a thing that just automatically unloads all the mechs you have defined in a before or in an example.

for example

describe("foo", fun() ->
  before_each(fun() ->
    %load mech 1
  end),

  it("should do stuff", fun() ->
  end),

  describe("nested", fun() ->
    before_each(fun() ->
      % load mech 2
    end),
    it("should do more stuff", fun() ->
    end),
  end)
end)

is converted to

load mech 1
run "should do stuff"
unload mech 1

load mech 1
load mech 2
run "should do more stuff"
unload mech 2
unload mech 1

we should probably provide an option to auto-verify as well.

not sure if mech already has something to make this easy...

Fix compilation errors on Erlang R14

https://travis-ci.org/lucaspiller/twerl/jobs/6906895

./espec spec
=ERROR REPORT==== 5-May-2013::22:35:13 ===
Loading of /home/travis/build/lucaspiller/twerl/espec/espec.beam failed: badfile
escript: exception error: undefined function espec:main/1
  in function  escript:run/2
  in call from escript:start/1
  in call from init:start_it/1
  in call from init:start_em/1
=ERROR REPORT==== 5-May-2013::22:35:13 ===
beam/beam_load.c(1365): Error loading module espec:
  use of opcode 153; this emulator supports only up to 152
make: *** [spec] Error 127
The command "make spec" exited with 2.

Making a standalone binary

I want to make a standalone binary so it is easier to use in other projects. I used rebar escriptize in c5f15ec, which worked to generate a standalone binary, except that isn't enough.

The parse transform we have in include/espec.hrl also needs to be shared in the other projects, as spec files include it at the top.

We need to find a way to either not require this to be included and have the espec command do the work, or for the espec command to add this to the lib path before running specs (I guess it could write a temporary directory, then add that to the lib path).

Asserts like eunit

Asserts like eunit, for example assertEqual, which when fail show you what was expected and what was returned. At the moment just a badmatch error is shown.

Using as a rebar dep

I'm trying to use espec as a dep of my rebar project and I'm not sure how to use the command line tool. I've been using ./deps/espec/bin/espec but that seems to fail.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.