senny / cabbage

get the maximum out of emacs
http://senny.github.com/cabbage/
156 stars 21 forks source link

new function to run a single ruby test-file. #196

Closed senny closed 10 years ago

senny commented 11 years ago

Key concepts:

Work to do:

Was caused by a bug in trunk and is not related to the code of this PR

  • [x] support test-suites that don't use require_relative and need the test directory in the LOAD_PATH

cabbage-ruby-test-ruby-options allows to pass options to ruby and defaults to -Itest

  • [x] support test-suites that need to pass environment variables

Can be achieved using (setenv "ENV" "VALUE")

  • [ ] somehow detect if _spec.rb is rspec or Minitest::Spec. Not sure how though...
tonini commented 11 years ago

@senny It's working great so far with minitest *_.test files. But as you already mentioned it tries to run via rspec if you have *_spec.rb minitest test files. (tried it with corner_stones)

senny commented 11 years ago

That is one issue, do you also experience the problem when you press M-e and all you get is a blank buffer? Sometimes switching into it gets it working but sometimes it just stays blank on my machine...

Also I really need to fix the default-directory, it's confusing when you try to open a file from the test-buffer and you are relative to the first project you ran a test and not the most recent one.

tonini commented 11 years ago

That is one issue, do you also experience the problem when you press M-e and all you get is a blank buffer? Sometimes switching into it gets it working but sometimes it just stays blank on my machine...

I never had this problem and I run it many times. But I have a similar problem within my elixir-mix.el package on my macbook air 2013. Sometimes the buffer is blank....sometimes not...I have no idea why.

Also I really need to fix the default-directory, it's confusing when you try to open a file from the test-buffer and you are relative to the first project you ran a test and not the most recent one.

Yeah that's an annoying one, happens for me also several times. How you will fix this one?

senny commented 11 years ago

@tonini I pushed a fix for the default-directory. The test-buffer now always has the default-directory of the project root where you executed the last test. This should also resolve issues where relative paths were not linked correctly.

Regarding the empty buffers, I have literally no clue why that is. I try to debug it but I'm kinda lost at the moment.

tonini commented 11 years ago

@senny great, thanks for the update, I will fetch it and run it for a bit.

senny commented 11 years ago

I downloaded and tried with the Emacs for OSX distribution and I never got the blank buffer while it's consistently appearing from the emacs-HEAD installed with homebrew. I'm going to try to use the latest release from homebrew as I don't think there is a need for HEAD anymore.

senny commented 11 years ago

brew install emacs --cocoa also works but sadly there is no useful way to get that version into fullscreen :bomb:

tonini commented 11 years ago

Yeah the fix for http://emacs.1067599.n5.nabble.com/bug-13444-24-3-50-OS-X-Mountain-Lion-Fullscreen-Broken-Toolbar-Behaviour-td275384.html is still not in the stable version.

senny commented 11 years ago

@tonini I added a few open Todo's to the issue description, do you see any other points we need to address?

tonini commented 11 years ago

@senny This looks good to me.

senny commented 10 years ago

I'm going to wrap this up later today, any additions or missing discussion points?

/cc @tonini

tonini commented 10 years ago

I'm good with the list, go for it. :+1:

senny commented 10 years ago

I'm not going to shoot for the last point though, I don't have a good idea how to detect it.