92 Commits

Author SHA1 Message Date
Will Farrington
e06fab1128 flesh out tests with some mocking (yuck) 2013-02-13 19:50:21 -08:00
Will Farrington
97b6366e8f spike test 2013-02-13 19:45:44 -08:00
Will Farrington
df0934ec4c ci 2013-02-13 11:51:29 -08:00
Will Farrington
ec171de46a Change --projects to not attempt to list installed ones in case of multiple dirs items are cloned to 2013-02-06 20:52:38 -08:00
Will Farrington
ec7f74e4ca Hook#run now handles checking if it should be performed 2013-01-31 16:04:58 -08:00
Will Farrington
c60c238dfd better isolation 2013-01-31 15:52:10 -08:00
Will Farrington
246926250b refactor to use #call 2013-01-31 15:50:32 -08:00
Will Farrington
16fc73ff68 boxen hook web test 2013-01-31 15:28:35 -08:00
Will Farrington
c4a79126d8 update runner test 2013-01-31 15:17:38 -08:00
Will Farrington
d36cd73bc0 remove reporter test 2013-01-31 15:05:57 -08:00
Will Farrington
9038f322f2 Add tests for the github issue hook 2013-01-31 15:05:27 -08:00
Will Farrington
85087059bd skip that shit 2013-01-21 18:16:14 -08:00
Will Farrington
35d3225976 Fix sudo prompt
/cc #31
2013-01-21 18:13:17 -08:00
Will Farrington
1820bcfa01 Add preflight check for boxen homedir 2013-01-21 16:57:27 -08:00
Will Farrington
446abcea22 Fix mocha deprecation warning 2013-01-21 16:16:10 -08:00
David Calavera
3305f3da83 Change Launchd identifiers from com.boxen.* to dev.*. 2013-01-17 14:24:04 -08:00
Yossef Mendelssohn
0afa7549e2 Multiple CLI projects, also using flags
What do I know about Facter? This test fails because once the fact is
set, it's set. Maybe I could do something with weights in the code, but
that seems silly. Probably should instead be testing this differently.
2012-10-26 01:53:53 -04:00
Yossef Mendelssohn
2c4c1359a9 Add command-line projects as fact
This test is a little troublesome because it needs sudo credentials and
it complains about there being no manifests/site.pp file.
2012-10-26 01:45:45 -04:00
Yossef Mendelssohn
ac06474978 Merge pull request #11 from boxen/runner
Refactor CLI to add Runner class
2012-10-11 12:03:06 -07:00
Yossef Mendelssohn
739e8a5ef9 Nice stringification for Boxen::Service 2012-10-11 12:22:08 -04:00
Yossef Mendelssohn
2d33c44b57 Use that Boxen::Service in the Runner
Isn't that so much nicer?

Yes, yes it is.
2012-10-11 12:21:13 -04:00
Yossef Mendelssohn
329d4efe66 an wild Boxen::Service appears!
This could be cleaned up more, what with the com.boxen.*.plist
repetition. Later.
2012-10-11 12:16:05 -04:00
Yossef Mendelssohn
ce4f86f35c Don't abort for help display
`abort` is a quick way to print-and-quit, but asking for help isn't the
same as the command failing.
2012-10-11 11:59:40 -04:00
Yossef Mendelssohn
e0dffec5c8 Don't report issues to us 2012-10-11 00:11:30 -04:00
Yossef Mendelssohn
80e9b5f0e7 No repo means no issues 2012-10-10 16:40:25 -04:00
Yossef Mendelssohn
182486e048 Skip failure reporting if repo has no issues 2012-10-10 16:34:03 -04:00
Yossef Mendelssohn
b7e7455be4 Add issue-check to Boxen::Reporter
The repository in use might not have issues enabled.
2012-10-10 16:26:29 -04:00
Yossef Mendelssohn
dc9e6c0d11 Let tests continue running after help display
Oh, that `abort`.
2012-10-10 13:11:08 -04:00
Yossef Mendelssohn
1de664a8a6 Move help display back to CLI from Runner
This is difficult to test because of that `abort` call.

Do we actually want the help to result in printing to stderr and
exiting with code 1?
2012-10-10 13:06:40 -04:00
Yossef Mendelssohn
47b42ab439 Use Puppet::Status instead of exit code 2012-10-10 12:44:26 -04:00
Yossef Mendelssohn
bddede55b6 Add logic to Puppet status code
This is used in multiple places now, and it should be boxed up with the
Puppet status anyway.
2012-10-10 12:41:50 -04:00
Yossef Mendelssohn
26e2899728 Extract CLI#run to a Runner class 2012-10-10 12:35:30 -04:00
Will Farrington
2ca1d9a1b9 indentation fixes 2012-10-09 11:52:18 -10:00
Will Farrington
79c6ef595a add cli support for --list-services, --enable-services, and --disable-services 2012-10-09 07:54:06 -10:00
Will Farrington
ca02b6aa6a add --list-services, --enable-services, --disable-services flags 2012-10-09 07:27:27 -10:00
Yossef Mendelssohn
5b779d3bac whitespace 2012-10-06 15:37:43 -04:00
Yossef Mendelssohn
73d2a444e8 Testing Puppet exit code 2 = success 2012-10-06 15:37:09 -04:00
Yossef Mendelssohn
535a9faf5f Refactor CLI#run tests
Now I can just stub `CLI#process` instead of caring what happens inside
it.

cf f0a9ad99e0
2012-10-05 15:50:51 -04:00
Yossef Mendelssohn
455ffb919b Fix repeated test definitions
Oh hey maybe I wanted to have two more tests instead of redefining a
couple.

MAYBE.
2012-10-05 15:48:03 -04:00
Yossef Mendelssohn
ea7719caa1 report → reporter
It makes more sense this way. I was trying too hard on the length
instead of the content.
2012-10-05 15:39:18 -04:00
Yossef Mendelssohn
66c4796f3e Don't affect issues unless it's wanted 2012-10-05 02:16:55 -04:00
Yossef Mendelssohn
1a1070f04e Check for whether issues should be affected 2012-10-05 02:14:33 -04:00
Yossef Mendelssohn
6c879a8dc4 Give CLI a Checkout, too
It'll need this to check for master branch.

It's all coming together.
2012-10-05 02:05:41 -04:00
Yossef Mendelssohn
e1a5da7a55 Move master? from Config to Checkout
It belongs with sha/changes/dirty?, and you know it.
2012-10-05 02:04:17 -04:00
Yossef Mendelssohn
988c9803bb Report failure/success of CLI#run
There's some repetition I'm not sure about here. I went with what the
comment said, though.
2012-10-05 01:56:54 -04:00
Yossef Mendelssohn
71edf89ddf Add Reporter to CLI 2012-10-05 01:42:16 -04:00
Yossef Mendelssohn
8d97b2f15a Reporter tests stubs → Structs
So much easier to read and deal with.

My variable name choice is becoming questionable.
2012-10-05 01:35:31 -04:00
Yossef Mendelssohn
7445eb957c Use actual objects in Reporter tests
API and Puppet can be opaque to this test, as Puppet is only used for
the command and I don't want to (yet) mess with different sort of API
testing. Config/Checkout, on the other hand, are related more closely
and have some related logic I don't want to continue stubbing.

More stubbing could be exchanged with attr_writer use (like what I
added for Config), except those methods don't use ivars.
2012-10-05 01:25:47 -04:00
Yossef Mendelssohn
3e8bb436c2 Use actual Config object in Checkout tests
This makes it more difficult to test (or at least pretend to test) the
`Dir.chdir` use in `sha` and `changes`.

I'm okay with that.
2012-10-05 01:10:41 -04:00
Yossef Mendelssohn
a9c459dcb4 Explicitly set success for stubbed system call
There's a test that checks for this being false, but these tests just
assume it'll be true.
2012-10-05 01:02:17 -04:00